I have some serious problems with one of my web servers running debian wheezy. It seem that last week the server center had an error which caused the machine to shutdown suddenly.

Since then some files seem to have gone corrupt.

sudo apt-get install -f
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 26 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Es müssen noch 0 B von 1.518 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
dpkg: Fehler beim Bearbeiten von perl-base (--configure):
 Paket perl-base ist nicht bereit zur Konfiguration
 kann nicht konfiguriert werden (momentaner Status »half-installed«)
man-db (2.6.2-1) wird eingerichtet ...
/var/lib/dpkg/info/man-db.postinst: 3: .: Can't open /usr/share/debconf/confmodule
dpkg: Fehler beim Bearbeiten von man-db (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
Fehler traten auf beim Bearbeiten von:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here it seems that perl is unconfigured and that man-db has some problems. I'm not able to install any system or software update.

I first had problems with glibc6 and reinstalled it from dpkg archive folder.

But the main cause seems to be that /usr/share/debconfdirectory is completely gone!

Does anyone have any suggestions on how I could 'save' that server and repair the system without a complete new installation ? Any help would be appreciated!

System Info

uname -a
Linux wn-main-debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
  • Re-install and restore from backup. In the end, that is going to be far quicker than going through the system and trying to figure out which files were affected. – EEAA Feb 11 '14 at 13:03
  • I hoped that answer wouldn't show up first. But I'm afraid this could truly be the best solution. Maybe someone had a similar problem. – cb0 Feb 11 '14 at 13:08

Ok, I found a working 'solution' which means that error above has gone away. I don't know if there are other errors that will come up. But for now this works and helps me backup everything.

Basically I install perl-base and debconf from archives folder.

/var/cache/apt/archives$ ls -als | grep perl
1484 -rw-r--r-- 1 root root 1517844 Sep 30 06:11 perl-base_5.14.2-21+deb7u1_amd64.deb

/var/cache/apt/archives$ sudo dpkg -i perl-base_5.14.2-21+deb7u1_amd64.deb 
(Lese Datenbank ... 44661 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von perl-base 5.14.2-21+deb7u1 (durch perl-base_5.14.2-21+deb7u1_amd64.deb) ...
Ersatz für perl-base wird entpackt ...
perl-base (5.14.2-21+deb7u1) wird eingerichtet ...

/var/cache/apt/archives$ ls -als | grep debconf
 168 -rw-r--r-- 1 root root  171018 Dez 26  2012 debconf_1.5.49_all.deb

/var/cache/apt/archives$ sudo dpkg -i debconf_1.5.49_all.deb 
(Lese Datenbank ... 44661 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von debconf 1.5.49 (durch debconf_1.5.49_all.deb) ...
Ersatz für debconf wird entpackt ...
debconf (1.5.49) wird eingerichtet ...
| improve this answer | |
  • I keep getting an error: Can't locate warnings.pm in @INC (you may need to install the warnings module) (@INC contains: /etc/perl – IgorGanapolsky Jan 30 '17 at 20:53

You could install the same OS version on another (virtual) system. Then, you should be able to rsync /usr/share/debconf or any other missing file to the broken system. If only static files are missing that should work. However, if e.g. the dpkg/debconf db is broken this won't help much. Not sure if this is faster than backup your data and reinstall.

| improve this answer | |

I was upgrading my linuxmint 19.2 to 19.3 and faced the same problem. I simply extracted the Debconf/ directory from the debconf package (same version as already installed) and copied to the locations mentioned in error. It worked for me.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.