E: Cannot get debconf version. Is debconf installed?

$ apt-get install ...
...
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
dpkg: error processing perl-base (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
Errors were encountered while processing:
 perl-base
E: Sub-process /usr/bin/dpkg returned an error code (1)

However, debconf is installed indeed and also within $PATH (test with which debconf). When this problem occurs, your dpkg status (database of installed packages) is broken. To confirm this, type:

$ dpkg -l | grep debconf

With a working configuration you should get something like

ii  debconf        1.5.49   all   Debian configuration management system
ii  debconf-i18n   1.5.49   all   full internationalization support for debconf
ii  debconf-utils  1.5.49   all   debconf utilities
ii  ssl-cert       1.0.32   all   simple debconf wrapper for OpenSSL

In a broken environment, you might get nothing at all. dpkg –clear-avail won’t help here. Instead, edit your /var/lib/dpkg/status and append the following lines at the bottom, separated from the previous entry by an empty line:

Package: debconf
Status: install ok installed
Priority: required
Section: admin
Installed-Size: 625
Maintainer: Debconf Developers <debconf-devel@lists.alioth.debian.org>
Architecture: all
Multi-Arch: foreign
Version: 1.5.49
Replaces: debconf-tiny
Provides: debconf-2.0
Pre-Depends: perl-base (>= 5.6.1-4)
Recommends: apt-utils (>= 0.5.1), debconf-i18n
Suggests: debconf-doc, debconf-utils, whiptail | dialog | gnome-utils, libterm-readline-gnu-perl, libgtk2-perl (>= 1:1.130), libnet-ldap-perl, perl, libqtgui4-perl, libqtcore4-perl
Conflicts: apt (<< 0.3.12.1), cdebconf (<< 0.96), debconf-tiny, debconf-utils (<< 1.3.22), dialog (<< 0.9b-20020814-1), menu (<= 2.1.3-1), whiptail (<< 0.51.4-11), whiptail-utf8 (<= 0.50.17-13)
Conffiles:
 /etc/debconf.conf 8c0619be413824f1fc7698cee0f23811
 /etc/bash_completion.d/debconf 8fa1862734fbe54d7178aaaa419f5a11
 /etc/apt/apt.conf.d/70debconf 7e9d09d5801a42b4926b736b8eeabb73
Description: Debian configuration management system
 Debconf is a configuration management system for debian packages. Packages
 use Debconf to ask questions when they are installed.

Package: debconf-utils
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 150
Maintainer: Debconf Developers <debconf-devel@lists.alioth.debian.org>
Architecture: all
Source: debconf
Version: 1.5.49
Replaces: debconf (<< 0.1.0) Depends: debconf (>= 1.3.20)
Conflicts: debconf (<< 0.1.0)
Description: debconf utilities
 This package contains some small utilities for debconf developers.

Package: debconf-i18n
Status: install ok installed
Priority: required
Section: localization
Installed-Size: 1100
Maintainer: Debconf Developers <debconf-devel@lists.alioth.debian.org>
Architecture: all
Source: debconf
Version: 1.5.49
Replaces: debconf (<< 1.3.0), debconf-utils (<< 1.3.22)
Depends: debconf, liblocale-gettext-perl, libtext-iconv-perl, libtext-wrapi18n-perl, libtext-charwidth-perl
Conflicts: debconf-english, debconf-utils (<< 1.3.22)
Description: full internationalization support for debconf
 This package provides full internationalization for debconf, including
 translations into all available languages, support for using translated
 debconf templates, and support for proper display of multibyte character
 sets.

These lines are taken from a stable wheezy environment. They tell your dpkg, that you have debconf-1.5.49 installed. It might proceed now, when you type apt-get -f install.

In case, you really don’t have debconfdebconf-utils or debconf-i18n installed, it might help to install them:

$ cd /var/cache/apt/archives
$ wget http://ftp.de.debian.org/debian/pool/main/d/debconf/{debconf_1.5.49_all.deb,debconf-utils_1.5.49_all.deb,debconf-i18n_1.5.49_all.deb}
$ dpkg -i debconf*
5695 mal insgesamt angesehen, 2 mal heute angesehen.
Dieser Beitrag wurde unter Fixes abgelegt und mit , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.