Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:
 perl-base
 man-db
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
share|improve this question
    
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 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 at 13:08

2 Answers 2

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 ...
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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