Debian : Depedency package not installed, but package files are installed

35 views
Skip to first unread message

Ravishankar Rajagopalan

unread,
Apr 1, 2016, 7:11:03 AM4/1/16
to fpm-users
I'm using Ubuntu 14.04 64-bit. I am building a package with some dependencies including curl (refer build command later). I was assuming that until these dependencies are not installed my package would not be installed.

However when I install my package (when it's not already installed) using sudo dpkg -i <my_package_name>, it executes my before-install script (which returns with exit status 0) and later gives me an error that the dependencies are not installed but actually goes ahead and installs my package, my package files are untarred & present,  as also the dpkg -l shows an entry for my package too !

Please see output below:
--
Executing command: sudo dpkg -i My_Install_Packager/mypack_1.0.1_amd64.deb
Selecting previously unselected package mypack.
(Reading database ... 1012608 files and directories currently installed.)
Preparing to unpack .../mypack_1.0.1_amd64.deb ...
Running pre_install_script_debian
pre_install_script_debian: Now installing
Unpacking mypack (1.0.1) ...
dpkg: dependency problems prevent configuration of mypack:
 mypack depends on curl (>= 7.35.0); however:
  Package curl is not installed.

dpkg: error processing package mypack (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mypack
ravishankar@ravishankar-desktop:~/tmp$ dpkg -l mypack
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
iU  mypack        1.0.1        amd64        Good to install software
ravishankar@ravishankar-desktop:~/tmp$
----

Build command on Ubuntu 14.04 64-bit:

fpm -s tar -t deb -a amd64 -d "curl (>= 7.35.0)" -d "uuid (>=1.6.2)" -d "openssl (>=1.0.1f)" -n mypack -v 1.0.1 --maintainer "Ravi <ra...@xxx.com>" --description "Good to install software" --url "http://xxx.com/crr" --category Networking --vendor "Ravi<ra...@xxxx.com>" --before-install pre_install_script_debian.sh --after-install post_install_script_debian.sh --after-remove post_remove_script_debian.sh --conflicts mypack --prefix /usr/xyz xyz.tar.gz


If I install the dependency package first and then run the dpkg -i command then predictably everything goes well. However this is creating a problem since it's my customer requirement that dependencies must be installed before our package is installed. This behaviour is correct in RPM though and it works well but not in Debian.

Can anyone please suggest what we should do to fix this issue?

Thanks,
Ravi

Daniel Haskin

unread,
Apr 1, 2016, 12:11:33 PM4/1/16
to fpm-users
that is normal behavior for dpkg. If you want your package not to be installed if the dependencies aren't there, you must put it in an APT repository and use APT to install the package. APT will then say "hey, look! this package has dependencies. Would you like to install the package *and* its dependencies, or no?" if your customer will be using apt to consume what you give them, then you're done. If not, then they shouldn't be using deb packages because it does not fit their use case :)

Ravishankar Rajagopalan

unread,
Apr 1, 2016, 12:30:38 PM4/1/16
to fpm-users
Thank you for the clarification Daniel. I observe that dpkg behaviour is a bit unpredictable at times. rpm seems to be a bit better on this front. I'll suggest them to use apt.

Ravi

Reply all
Reply to author
Forward
0 new messages