I am making a Debian package that contains multiple packages. So in the Debian package, I moved my ./drivers/*.deb to $DEBIAN/data/itms/drivers.
sudo mkdir -p $DEBIAN/mnt
sudo mkdir -p $DEBIAN/mnt/data
sudo mkdir -p $DEBIAN/mnt/data/itms
sudo mkdir -p $DEBIAN/mnt/data/itms/drivers
sudo cp -vr ./drivers/* $DEBIAN/mnt/data/itms/drivers # moving the *deb from driver folders into $DEBIAN
Then in the postint script, I would run sudo dpkg -i -R /mnt/data/itms/drivers
. However, I got this
E:could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: unable to aquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
dpkg: error processing package xx-drivers (--install):
installed xx-drivers package post-installation script subprocess returned error exit status 100
I am thinking it is because I am running the dpkg to extract my xx-drivers.deb, but my post is also trying to access dpkg. Is there anyway I can have my dpkg my debian packages inside xx-drivers.deb?
Thanks you!
packagename.deb
. You designpackagename.deb
to calldependecy1.deb
anddependecy2.deb
etc. as dependencies ofpackagename
. Then, just put all of the packages in the same directory so you can simply runsudo apt install "./*.deb"
For example, if they are all in a directory named~/drivers
you would runsudo apt install "~/drivers/*.deb"
and apt will automatically install the first package and the dependencies as well. – mchid Apr 27 '22 at 16:33dpkg
do two things at once instead of simply allowing apt to call dpkg and handle dependency issues for you like it is supposed to. This is what dependencies are for. This is why we have dependencies. If you need to install multiple packages, simply list them as dependencies, make sure they are available when you runapt
, and then, allow apt to automatically install the package and the dependencies. – mchid Apr 27 '22 at 16:36