0

I am trying to test if my .deb package is installing correctly, but I always get this error:

dpkg (subprocess): cannot set security execution context for maintainer script: Invalid argument
dpkg: error processing package testpkg (--install):
 installed testpkg package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 testpkg

What is this? My postinst script looks like this

#!/bin/bash
chmod +x /usr/bin/testpkg
exit 0

I'm super confused

Tal
  • 1
  • 1
    I think you should give us more informations, something like how you create your .deb package, which (L,X,K)Ubuntu version you're on and maybe your architecture – lucki1000 Mar 13 '22 at 20:26
  • also you can't make a file executable who doesn't exist, that's why you get exit status 2, in your post script you define what to do before installing your package – lucki1000 Mar 13 '22 at 20:38
  • @lucki1000, is there a way to see the actual error? I tried removing the chmod but the error persisted – Tal Mar 14 '22 at 06:50
  • provide please the steps who you made, to get your .deb package – lucki1000 Mar 14 '22 at 15:52
  • Also I take back my second comment, after I saw this post https://askubuntu.com/a/62559/1206611, but you should really provide some more information about your build enviromment. – lucki1000 Mar 14 '22 at 21:32

0 Answers0