LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Help using dpkg to build and install debian packages (http://www.linuxquestions.org/questions/linux-general-1/help-using-dpkg-to-build-and-install-debian-packages-568795/)

Mahonri 07-12-2007 01:20 PM

Help using dpkg to build and install debian packages
 
Hello All,

I need some help understanding how dpkg works. Specifically, I would like to know how the mechanism for checking debian package dependencies works. I'd like to know what essential files are needed for this.

I've built a few packages and tried to install them. Those with dependencies are failing to install for some reason.

Here is my scenario:

I built a binary libc6-i386.deb package on my Debian host and installed it on another host which has nothing but a bare Linux 2.6.21.1 kernel and a static busybox installed. I used the busybox 'dpkg' command to install the package. Everything went fine and the output of the 'dpkg -l' command is:

Name Version
+++-=============-==============
ii libc6-i386 2.3.6

After this, I built a busybox package to re-install the full busybox implementation on to my target host. This package is dependent on libc6-i386 as can be seen from the 'dpkg --info' command:

dallas@debian:~/packages$ dpkg --info busybox_1.6.0-1_i386.deb
new debian package, version 2.0.
size 233752 bytes: control archive= 619 bytes.
444 bytes, 12 lines control
258 bytes, 4 lines md5sums
Package: busybox
Version: 1.6.0-1
Section: unknown
Priority: extra
Architecture: i386
Depends: libc6-i386 (>= 2.3.5-1)
Installed-Size: 436
Maintainer: Dallas Clement <dallas.clement@specktel.com>
Description: Busybox UNIX command utilities.
BusyBox combines tiny versions of many common UNIX utilities into \
a single small executable. It provides replacements for most of the \
utilities you usually find in GNU fileutils, shellutils, etc.

When I try to install this package, it fails during the installation. This is the error I get:

dpkg: package busybox depends on libc6-i386, which is not installed or flagged to be installed


I cannot understand why I am getting this error, when clearly the libc6-i386 package is installed as you can see from the previous 'dpkg -l' output.

In fact, the contents of the /var/lib/dpkg/status file are as follows:

cat /var/lib/dpkg/status

Package: libc6-i386
Version: 2.3.6
Section: libs
Priority: optional
Architecture: i386
Maintainer: Dallas Clement <dallas.clement@specktel.com>
Description: The GNU C library
The GNU C library is the standard C/C++ library \
needed to support most Linux applications.
Status: install ok installed

----

Clearly, the libc6-i386 package is installed.

Is there anything else that 'dpkg' checks other than this 'status' file to do the dependency check? Is it just a simple package name check, or is there more involved?

Thanks in advance for any help you could provide.

emi_ramo 07-24-2007 10:44 AM

you can use apt-get instead of directly dpkg...


All times are GMT -5. The time now is 11:42 PM.