View Issue Details

IDProjectCategoryView StatusLast Update
0007516Kali LinuxKali Package Bugpublic2021-12-31 01:43
Reporterlinuxkd Assigned Toarnaudr  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version2021.4 
Summary0007516: bind9-libs causes dpkg errors that prevent installation of other packages, causes apt failures afterwards
Description

Installing bind9-libs either directly or as a dependency causes issues with dpkg and the apt database.

Steps To Reproduce

1) Setup minimal base OS (I used debian 11 minimal as a starting point, I have my reasons).
2) Set apt sources.list as kali-rolling
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list

3) Install bind9-libs
apt install -y bind9-libs

Additional Information

root@ip-172-31-0-223:/home/admin# apt install bind9-libs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libfstrm0 libicu67 libjemalloc2 libjson-c5 liblmdb0 libmaxminddb0 libprotobuf-c1 libuv1 libxml2
Suggested packages:
mmdb-bin
The following NEW packages will be installed:
bind9-libs libfstrm0 libicu67 libjemalloc2 libjson-c5 liblmdb0 libmaxminddb0 libprotobuf-c1 libuv1 libxml2
0 upgraded, 10 newly installed, 0 to remove and 2 not upgraded.
Need to get 11.3 MB of archives.
After this operation, 46.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://http.kali.org/kali kali-rolling/main amd64 libfstrm0 amd64 0.6.0-1+b1 [21.5 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 libjemalloc2 amd64 5.2.1-4 [247 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 libjson-c5 amd64 0.15-2 [42.8 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 liblmdb0 amd64 0.9.24-1 [45.0 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 libmaxminddb0 amd64 1.5.2-1 [29.8 kB]
Get:6 http://http.kali.org/kali kali-rolling/main amd64 libprotobuf-c1 amd64 1.3.3-1+b2 [27.0 kB]
Get:7 http://kali.download/kali kali-rolling/main amd64 libuv1 amd64 1.42.0-1 [135 kB]
Get:8 http://kali.download/kali kali-rolling/main amd64 libicu67 amd64 67.1-7 [8622 kB]
Get:9 http://http.kali.org/kali kali-rolling/main amd64 libxml2 amd64 2.9.12+dfsg-5+b1 [701 kB]
Get:10 http://kali.download/kali kali-rolling/main amd64 bind9-libs amd64 1:9.17.21-1 [1389 kB]
Fetched 11.3 MB in 1s (9610 kB/s)
Selecting previously unselected package libfstrm0:amd64.
(Reading database ... 7403 files and directories currently installed.)
Preparing to unpack .../0-libfstrm0_0.6.0-1+b1_amd64.deb ...
Unpacking libfstrm0:amd64 (0.6.0-1+b1) ...
Selecting previously unselected package libjemalloc2:amd64.
Preparing to unpack .../1-libjemalloc2_5.2.1-4_amd64.deb ...
Unpacking libjemalloc2:amd64 (5.2.1-4) ...
Selecting previously unselected package libjson-c5:amd64.
Preparing to unpack .../2-libjson-c5_0.15-2_amd64.deb ...
Unpacking libjson-c5:amd64 (0.15-2) ...
Selecting previously unselected package liblmdb0:amd64.
Preparing to unpack .../3-liblmdb0_0.9.24-1_amd64.deb ...
Unpacking liblmdb0:amd64 (0.9.24-1) ...
Selecting previously unselected package libmaxminddb0:amd64.
Preparing to unpack .../4-libmaxminddb0_1.5.2-1_amd64.deb ...
Unpacking libmaxminddb0:amd64 (1.5.2-1) ...
Selecting previously unselected package libprotobuf-c1:amd64.
Preparing to unpack .../5-libprotobuf-c1_1.3.3-1+b2_amd64.deb ...
Unpacking libprotobuf-c1:amd64 (1.3.3-1+b2) ...
Selecting previously unselected package libuv1:amd64.
Preparing to unpack .../6-libuv1_1.42.0-1_amd64.deb ...
Unpacking libuv1:amd64 (1.42.0-1) ...
Selecting previously unselected package libicu67:amd64.
Preparing to unpack .../7-libicu67_67.1-7_amd64.deb ...
Unpacking libicu67:amd64 (67.1-7) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../8-libxml2_2.9.12+dfsg-5+b1_amd64.deb ...
Unpacking libxml2:amd64 (2.9.12+dfsg-5+b1) ...
Selecting previously unselected package bind9-libs:amd64.
Preparing to unpack .../9-bind9-libs_1%3a9.17.21-1_amd64.deb ...
Unpacking bind9-libs:amd64 (1:9.17.21-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-wuIp8t/9-bind9-libs_1%3a9.17.21-1_amd64.deb (--unpack):
triggers ci file contains unknown directive '602:'
Errors were encountered while processing:
/tmp/apt-dpkg-install-wuIp8t/9-bind9-libs_1%3a9.17.21-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Subsequent installs become broken
root@ip-172-31-0-223:/home/admin# apt install -y responder
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
bind9-libs libmpdec3 libpython3-stdlib libpython3.9-minimal libpython3.9-stdlib libsmartcols1 libuuid1 media-types net-tools python3 python3-minimal python3-netifaces python3-pkg-resources python3-pycryptodome python3-six python3.9
python3.9-minimal tzdata uuid-runtime
Suggested packages:
python3-doc python3-tk python3-venv python3-setuptools python3.9-venv python3.9-doc binutils binfmt-support
The following NEW packages will be installed:
libmpdec3 libpython3-stdlib libpython3.9-minimal libpython3.9-stdlib libsmartcols1 libuuid1 media-types net-tools python3 python3-minimal python3-netifaces python3-pkg-resources python3-pycryptodome python3-six python3.9 python3.9-minimal responder
tzdata uuid-runtime
The following packages will be upgraded:
bind9-libs
1 upgraded, 19 newly installed, 0 to remove and 2 not upgraded.
10 not fully installed or removed.
Need to get 7757 kB/9146 kB of archives.
After this operation, 42.3 MB of additional disk space will be used.
Get:1 http://kali.download/kali kali-rolling/main amd64 libpython3.9-minimal amd64 3.9.9-2 [804 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 python3.9-minimal amd64 3.9.9-2 [1924 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 python3-minimal amd64 3.9.7-1 [38.4 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 media-types all 4.0.0 [30.3 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 tzdata all 2021e-1 [291 kB]
Get:6 http://kali.download/kali kali-rolling/main amd64 libmpdec3 amd64 2.5.1-2 [87.8 kB]
Get:7 http://kali.download/kali kali-rolling/main amd64 libuuid1 amd64 2.37.2-4 [84.7 kB]
Get:8 http://kali.download/kali kali-rolling/main amd64 libpython3.9-stdlib amd64 3.9.9-2 [1680 kB]
Get:9 http://kali.download/kali kali-rolling/main amd64 python3.9 amd64 3.9.9-2 [484 kB]
Get:10 http://kali.download/kali kali-rolling/main amd64 libpython3-stdlib amd64 3.9.7-1 [21.6 kB]
Get:11 http://kali.download/kali kali-rolling/main amd64 python3 amd64 3.9.7-1 [38.0 kB]
Get:12 http://kali.download/kali kali-rolling/main amd64 libsmartcols1 amd64 2.37.2-4 [161 kB]
Get:13 http://kali.download/kali kali-rolling/main amd64 uuid-runtime amd64 2.37.2-4 [103 kB]
Get:14 http://http.kali.org/kali kali-rolling/main amd64 net-tools amd64 1.60+git20181103.0eebece-1 [250 kB]
Get:15 http://http.kali.org/kali kali-rolling/main amd64 python3-netifaces amd64 0.11.0-1+b1 [18.1 kB]
Get:16 http://kali.download/kali kali-rolling/main amd64 python3-pkg-resources all 58.2.0-1 [192 kB]
Get:17 http://http.kali.org/kali kali-rolling/main amd64 python3-pycryptodome amd64 3.11.0+dfsg1-3 [1008 kB]
Get:18 http://kali.download/kali kali-rolling/main amd64 python3-six all 1.16.0-2 [17.5 kB]
Get:19 http://kali.download/kali kali-rolling/main amd64 responder all 3.1.1.0-0kali1 [521 kB]
Fetched 7757 kB in 2s (3619 kB/s)
apt-listchanges: Reading changelogs...
Preconfiguring packages ...
(Reading database ... 7491 files and directories currently installed.)
Preparing to unpack .../bind9-libs_1%3a9.17.21-1_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/bind9-libs_1%3a9.17.21-1_amd64.deb (--unpack):
triggers ci file contains unknown directive '602:'
Selecting previously unselected package libpython3.9-minimal:amd64.
Preparing to unpack .../libpython3.9-minimal_3.9.9-2_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.9-2) ...
Selecting previously unselected package python3.9-minimal.
Preparing to unpack .../python3.9-minimal_3.9.9-2_amd64.deb ...
Unpacking python3.9-minimal (3.9.9-2) ...
Errors were encountered while processing:
/var/cache/apt/archives/bind9-libs_1%3a9.17.21-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The only working method of removing the blocker that I have found that works every time
sudo rm /var/lib/dpkg/info/bind9-libs.*
sudo dpkg --remove --force-remove-reinstreq bind9-libs
sudo apt-get remove bind9-libs
sudo apt-get autoremove && sudo apt-get autoclean

this packages is a dependency for dnsutils (nslookup, dig, etc)

Activities

linuxkd

linuxkd

2021-12-28 14:52

reporter   ~0015574

This section was slightly wrong in my original post, there should not be a period in the first line, this is the corrected version

The only working method of removing the blocker that I have found that works every time
sudo rm /var/lib/dpkg/info/bind9-libs*
sudo dpkg --remove --force-remove-reinstreq bind9-libs
sudo apt-get remove bind9-libs
sudo apt-get autoremove && sudo apt-get autoclean

linuxkd

linuxkd

2021-12-28 15:22

reporter   ~0015576

Dug a little further, here is some more relevant information.

dpkg version info
dpkg/kali-rolling,now 1.20.9kali1 amd64 [installed]

root@ip-172-31-0-223:~/work1# dpkg --version
Debian 'dpkg' package management program version 1.20.9 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.

I extracted the bind9-libs package to look at the triggers file, here is the contents along with checksum
root@ip-172-31-0-223:~/work1# cat triggers

Triggers added by dh_makeshlibs/13.5.2

activate-noawait ldconfig

root@ip-172-31-0-223:~/work1# sha1sum triggers
abbc6a3e27bc6d46c07796eb1b76449bac8f16d6 triggers

arnaudr

arnaudr

2021-12-30 07:53

manager   ~0015583

Hello. I can't reproduce this issue when I build a Kali OS from scratch. It seems that the issue is really due to your setup, ie. starting from a Debian OS and then transforming it into Kali. It would be better to NOT do that !! This is not supported, and it's a recipe for tears and sorrow.

Out of curiosity, why not just starting from a minimal Kali OS (it's easy with debootstrap) ?

Otherwise, if you insist on doing that, you can have a look here: https://gitlab.com/kalilinux/tools/kali-ci-autopkgtest-lxc/-/blob/master/.gitlab-ci.yml#L53-75 This is a place where we do that, ie. start from a Debian min OS and transform it into Kali afterward. In short:

  • update sources.list (what you already did)
  • install the kali keyring
  • dist-upgrade (that should bring in Kali's fork of dpkg)
  • check that there's now a file /etc/dpkg/origins/kali
  • then fix the vendor symlink with:


rm -f $ROOTDIR/etc/dpkg/origins/default
ln -sf kali $ROOTDIR/etc/dpkg/origins/default

From this point, I guess it should fix your problem. But there might be more issues down the road waiting for you, because this is just NOT the right way to bootstrap a Kali image.

arnaudr

arnaudr

2021-12-30 07:55

manager   ~0015584

(also for this kind of questions, please consider going through https://forums.kali.org/ rather than the bugtracker, as this is definitely not a bug)

linuxkd

linuxkd

2021-12-30 14:10

reporter   ~0015587

Thank you very much for the detailed response, and noted on the forums bit.

arnaudr

arnaudr

2021-12-31 01:43

manager   ~0015590

No worries, I'm closing this issue then. Have a nice day and happy new year!

Issue History

Date Modified Username Field Change
2021-12-28 14:39 linuxkd New Issue
2021-12-28 14:52 linuxkd Note Added: 0015574
2021-12-28 15:22 linuxkd Note Added: 0015576
2021-12-30 07:53 arnaudr Note Added: 0015583
2021-12-30 07:55 arnaudr Note Added: 0015584
2021-12-30 14:10 linuxkd Note Added: 0015587
2021-12-31 01:43 arnaudr Note Added: 0015590
2021-12-31 01:43 arnaudr Assigned To => arnaudr
2021-12-31 01:43 arnaudr Status new => closed
2021-12-31 01:43 arnaudr Resolution open => unable to reproduce