The package bind9-host needs to be reinstalled

Asked by soumen roy on 2019-02-27

Currently, I am using Ubuntu 14.04. Whenever I am going to install anything, it shows
 "E: The package bind9-host needs to be reinstalled, but I can't find an archive for it."

I also tried to reinstall using "sudo apt-get install --reinstall -f bind9". For this case, I am getting the same error.
This becomes a serious issue since I am not able to install anything.

Can you please help me?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bind9 Edit question
Assignee:
No assignee Edit question
Solved by:
soumen roy
Solved:
2019-02-28
Last query:
2019-02-28
Last reply:
2019-02-27
Manfred Hampl (m-hampl) said : #1

For diagnostic purposes please provide the output that you receive for the commands

uname -a
lsb_release -crid
sudo dpkg --audit
apt-cache policy bind9-host
dpkg -l | grep bind9-host

soumen roy (roy-soumen61) said : #2

Thanks for the response. I have shared the corresponding output below

$ uname -a
Linux roy 4.4.0-142-generic #168~14.04.1-Ubuntu SMP Sat Jan 19 11:26:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

$ sudo dpkg --audit
The following packages are in a mess due to serious problems during
installation. They must be reinstalled for them (and any packages
that depend on them) to function properly:
 bind9-host Version of 'host' bundled with BIND 9.X

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 bind9-dbgsym debug symbols for bind9

$ apt-cache policy bind9-host
bind9-host:
  Installed: 1:9.9.5.dfsg-3ubuntu0.18
  Candidate: 1:9.9.5.dfsg-3ubuntu0.18
  Version table:
 *** 1:9.9.5.dfsg-3ubuntu0.18 0
        100 /var/lib/dpkg/status

$ dpkg -l | grep bind9-host
pHR bind9-host 1:9.9.5.dfsg-3ubuntu0.18 amd64 Version of 'host' bundled with BIND 9.X

Manfred Hampl (m-hampl) said : #3

I suggest that you try the following commands:

wget http://launchpadlibrarian.net/389236636/bind9-host_9.9.5.dfsg-3ubuntu0.18_amd64.deb
sudo dpkg -i bind9-host_9.9.5.dfsg-3ubuntu0.18_amd64.deb

Additionally you seem to have an error in the configuration of the package management system. The "apt-cache ..." command did not show any repository for the bind9-host package, which is strange.

What is the output of the commands

cat -n /etc/apt/sources.list
sudo apt-get update

soumen roy (roy-soumen61) said : #4

I have installed it from the following link.

Output from the commands:

$ cat -n /etc/apt/sources.list
     1 # deb cdrom:[Ubuntu 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted
     2 deb-src http://archive.ubuntu.com/ubuntu trusty main restricted #Added by software-properties
     3
     4 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     5 # newer versions of the distribution.
     6 deb http://archive.ubuntu.com/ubuntu trusty main restricted
     7 deb-src http://archive.ubuntu.com/ubuntu trusty multiverse universe #Added by software-properties
     8
     9 ## Major bug fix updates produced after the final release of the
    10 ## distribution.
    11 deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted
    12 deb-src http://archive.ubuntu.com/ubuntu trusty-updates main multiverse restricted universe #Added by software-properties
    13
    14 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    15 ## team. Also, please note that software in universe WILL NOT receive any
    16 ## review or updates from the Ubuntu security team.
    17 deb http://archive.ubuntu.com/ubuntu trusty universe
    18 deb http://archive.ubuntu.com/ubuntu trusty-updates universe
    19
    20 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    21 ## team, and may not be under a free licence. Please satisfy yourself as to
    22 ## your rights to use the software. Also, please note that software in
    23 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    24 ## security team.
    25 deb http://archive.ubuntu.com/ubuntu trusty multiverse
    26 deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
    27
    28 ## N.B. software from this repository may not have been tested as
    29 ## extensively as that contained in the main release, although it includes
    30 ## newer versions of some applications which may provide useful features.
    31 ## Also, please note that software in backports WILL NOT receive any review
    32 ## or updates from the Ubuntu security team.
    33 deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
    34 deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse #Added by software-properties
    35
    36 deb http://archive.ubuntu.com/ubuntu trusty-security main restricted
    37 deb-src http://archive.ubuntu.com/ubuntu trusty-security main multiverse restricted universe #Added by software-properties
    38 deb http://archive.ubuntu.com/ubuntu trusty-security universe
    39 deb http://archive.ubuntu.com/ubuntu trusty-security multiverse
    40
    41 ## Uncomment the following two lines to add software from Canonical's
    42 ## 'partner' repository.
    43 ## This software is not part of Ubuntu, but is offered by Canonical and the
    44 ## respective vendors as a service to Ubuntu users.
    45 # deb http://archive.canonical.com/ubuntu trusty partner
    46 # deb-src http://archive.canonical.com/ubuntu trusty partner
    47
    48 ## This software is not part of Ubuntu, but is offered by third-party
    49 ## developers who want to ship their latest software.
    50 deb http://extras.ubuntu.com/ubuntu trusty main
    51 deb-src http://extras.ubuntu.com/ubuntu trusty main

$ sudo apt-get update
Ign http://dl.google.com stable InRelease
Hit http://ppa.launchpad.net trusty InRelease
Ign http://archive.ubuntu.com trusty InRelease
Ign http://extras.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Hit http://extras.ubuntu.com trusty Release.gpg
Ign http://ppa.launchpad.net trusty InRelease
Hit http://extras.ubuntu.com trusty Release
Ign http://ppa.launchpad.net trusty InRelease
Hit http://dl.google.com stable Release.gpg
Hit http://extras.ubuntu.com trusty/main Sources
Hit http://archive.ubuntu.com trusty-backports InRelease
Hit http://dl.google.com stable Release
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Get:2 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
Hit http://ppa.launchpad.net trusty InRelease
Hit https://desktop-download.mendeley.com stable InRelease
Hit https://desktop-download.mendeley.com stable/main amd64 Packages
Hit http://extras.ubuntu.com trusty/main i386 Packages
Hit https://desktop-download.mendeley.com stable/main i386 Packages
Get:3 http://archive.ubuntu.com trusty Release.gpg [933 B]
Ign http://ppa.launchpad.net trusty InRelease
Get:4 http://archive.ubuntu.com trusty-updates/main Sources [427 kB]
Hit http://ppa.launchpad.net trusty InRelease
Hit http://dl.google.com stable/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:5 https://desktop-download.mendeley.com stable/main Translation-en_IN
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Get:6 https://desktop-download.mendeley.com stable/main Translation-en
Hit http://ppa.launchpad.net trusty Release.gpg
Hit https://packagecloud.io jessie InRelease
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:7 https://desktop-download.mendeley.com stable/main Translation-en_IN
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Get:8 https://desktop-download.mendeley.com stable/main Translation-en
Hit http://ppa.launchpad.net trusty Release.gpg
Hit https://packagecloud.io jessie/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:9 https://desktop-download.mendeley.com stable/main Translation-en_IN
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://ppa.launchpad.net trusty Release
Hit https://packagecloud.io jessie/main i386 Packages
Get:10 https://desktop-download.mendeley.com stable/main Translation-en
Hit http://ppa.launchpad.net trusty Release
Ign http://dl.google.com stable/main Translation-en_IN
Get:11 https://packagecloud.io jessie/main Translation-en_IN
Hit http://ppa.launchpad.net trusty Release
Get:12 https://desktop-download.mendeley.com stable/main Translation-en_IN
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:13 https://desktop-download.mendeley.com stable/main Translation-en
Ign http://dl.google.com stable/main Translation-en
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:14 https://desktop-download.mendeley.com stable/main Translation-en_IN
Ign https://desktop-download.mendeley.com stable/main Translation-en_IN
Get:15 https://desktop-download.mendeley.com stable/main Translation-en
Ign https://desktop-download.mendeley.com stable/main Translation-en
Ign https://packagecloud.io jessie/main Translation-en_IN
Ign https://packagecloud.io jessie/main Translation-en
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://ppa.launchpad.net trusty/main Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Ign http://ppa.launchpad.net trusty/main Translation-en_IN
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://ppa.launchpad.net trusty/main Translation-en_IN
Ign http://ppa.launchpad.net trusty/main Translation-en
100% [Waiting for headers] [Waiting for headers]

The update process is hanging here.

After installing the package from your specified link, I tried to install an arbitrary package, the output is below:
$ sudo apt-get install idle
Reading package lists... Done
Building dependency tree
Reading state information... Done
idle is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 bind9-dbgsym : Depends: bind9 (= 1:9.11.5.P1+dfsg-1ubuntu1) but it is not installable
 light-themes : Depends: ubuntu-mono but it is not installable
 ubuntu-artwork : Depends: ubuntu-mono but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Manfred Hampl (m-hampl) said : #5

If the command "sudo apt-get update" is not complete, then you are missing information about available packages.
You have to make sure that this command finishes without error. I suggest that you repeat this command, eventually several times.

Afterwards please provide the output of the command
apt-cache policy bind9-dbgsym bind9 light-themes ubuntu-mono ubuntu-artwork

soumen roy (roy-soumen61) said : #6

After installing the following link of bind9-host, I have run "sudo apt-get update" for several times and then I was able to update the system. Now the problem is solved.

Thanks for your valuable time.