[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I broke apache and hacked a fix, but what happened and how do I fix it properly?



Is it possible that somehow a symlink got deleted as part of some deb being (un)installed? In the meantime, if it ain't broke ...?

definitely possible. Try:

apt-cache depends apache
apt-get -f install --reinstall apache (and others)

which should replace your depends- libraries.

somethign like:

apt-cache depends apache | grep Depends | grep -v "<" | awk '{print $2}' | apt-get install --reinstall -

might do it.

:>

-g


The above command didn't do too well:

debian:~# apt-cache depends apache | grep Depends | grep -v "<" | awk '{print $2}' | apt-get -f install --reinstall -
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
debian:~#

I tried it with xargs, but that fared little better (longer output below). Finally settled on:

for f in $(apt-cache depends apache | grep Depends | grep -v "<" | awk '{print $2}'); do apt-get -f install --reinstall ${f}; done

which worked, though it tediously prompted me to insert the CD for each package.

Anyway the upshot was:
debian:~# ls -l /lib/libdb*
-rw-r--r--    1 root     root       233488 Apr 18  2002 /lib/libdb.so.3
lrwxrwxrwx 1 root root 15 Feb 14 21:00 /lib/libdb2.so.2 -> libdb2.so.2.7.7
-rw-r--r--    1 root     root       262812 Apr 18  2002 /lib/libdb2.so.2.7.7
debian:~# apache
apache: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory

so it's back to:

debian:/lib# ln -s libdb.so.3 libdb.so.2
debian:/lib# apache
[Fri Feb 14 21:10:34 2003] [alert] apache: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I think I'll leave it for now :-).  Thanks for everyone's help.


FYI: Here's the xargs output in full:

debian:~# apt-cache depends apache | grep Depends | grep -v "<" | awk '{print $2}' | xargs -n1 apt-get -f install --reinstall
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, re-installation of libc6 is not possible, it cannot be downloaded.
0 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/264kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/50.2kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/68.4kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/813kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/813kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/1150kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/26.6kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/1073kB of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n] Abort.
debian:~#




Reply to: