[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?

Ivan Uemlianin wrote:
Thanks for all comments.

I have both libdb2 and libdb3 installed.

Following the comment below I changed the symlink like this:

debian:/lib# ln -s libdb2.so.2 libdb.so.2
debian:/lib# ls -l libdb*
lrwxrwxrwx 1 root root 11 Feb 12 23:30 libdb.so.2 -> libdb2.so.2
-rw-r--r--    1 root     root       233488 Apr 18  2002 libdb.so.3
lrwxrwxrwx 1 root root 15 Sep 24 10:06 libdb2.so.2 -> libdb2.so.2.7.7
-rw-r--r--    1 root     root       262812 Apr 18  2002 libdb2.so.2.7.7

But that didn't go down well:

debian:/lib# apache
Syntax error on line 222 of /etc/apache/httpd.conf:
Cannot load /usr/lib/apache/1.3/mod_rewrite.so into server: /lib/libdb.so.2: version `GLIBC_2.0' not found (required by /usr/lib/apache/1.3/mod_rewrite.so)

So, I think I'll stick with ln -s libdb.so.3 libdb.so.2.

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.





Ken Weinert wrote:

On Tue, Feb 11, 2003 at 01:06:37PM -0400, Derek Broughton wrote:

From: "Ivan Uemlianin" <iau@ukfsn.org>

I had a perfectly good Apache installation; broke it (by accident) and
hacked a fix.  But I'd like to know what happened and how to fix it

The error I was getting is:

debian:/# apache

apache: error while loading shared libraries: libdb.so.2: cannot open
shared object file: No such file or directory

If I recall the original email correctly, you almost had the right
fix. The problem is that libdb.so.2 is supposed to be a generic link
for version 2 of the library to the specific version 2 library that
was installed. For example (and I know I don't have the numbers
exactly correct) you said you had libdb.so.2.1.0 - that's the release
of the version 2 library that was installed.

You should have symbolically linked libdb.so.2 to libdb.so.2.1.0 - I
think you linked it to the version 3 library (libdb.so.3.x.y) which
might work in most cases, and might always work for your particular
program. However, changing a major version number implies an interface
change, or at least some incompatibility with the previous version.

I'm not surprised that uninstalling a package doesn't restore the
link, but as Ivan said, reinstalling should restore the link as that
will be one of the post-install operations.


Glen Mehn	glen@burningman.com
"if you ever swallow the universe, remember to spit the dragon
	back out.xx.		--swan

Reply to: