I have created a deb
package say abc.deb
. Now there are few dependencies like python-dev, python-mysql
etc., which are needed to be installed as a part of deb installation itself.
(i.e. when user runs dpkg -i abc.deb
, the dependencies should also get installed automatically).
I am using a control
file which contains few parameters like preinst, postinst
etc. I tried to add Depends
to the control file, but I guess, Depends
only stops package installation if dependencies mentioned are not present. How could I install the dependencies as a part of deb package installation itself? I am looking for a solution that will work on Ubuntu 12.04
.
P.S. When I try to install dependencies in my postinst
script as
sudo apt-get install python-dev -y
I gives me an error:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?`