# Postfix broken after mySQL upgrade. [SOLVED]

## epig

Postfix refuses to start after an upgrade and some research gives the error message:

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

Then I run a:

```
locate libmysqlclient.so.15
```

which produces:

```
/usr/lib/libmysqlclient.so.15

/usr/lib/libmysqlclient.so.15.0.0
```

All looks OK to me?

running 

```
revdep-rebuild
```

 does not fix the problem. (it does, however, run without errors)

Some searching in the Gentoo forums gives a suggestion to do the following:

```
revdep-rebuild --soname libmysqlclient.so.15
```

This produces the following error:

```
>>> Install postfix-2.2.5 into /var/tmp/portage/postfix-2.2.5/image/ category mail-mta

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

bin/postconf: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

postfix-install: Error: "" should be "no" or an absolute path name.

!!! ERROR: mail-mta/postfix-2.2.5 failed.

!!! Function src_install, Line 212, Exitcode 1

!!! postfix-install failed

!!! If you need support, post the topmost build error, NOT this status message.
```

I have a feeling there is a simple solution to this, but I don't see what it is? Any ideas?Last edited by epig on Wed Nov 23, 2005 1:14 pm; edited 1 time in total

----------

## magic919

I take it you use mysql with Postfix...

Have you looked at output of

```
ldd /usr/sbin/postfix
```

 for clues?

----------

## epig

root@foo ~ # ldd /usr/sbin/postfix

        linux-gate.so.1 =>  (0xffffe000)

        libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7ed7000)

        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7eaa000)

        libpthread.so.0 => /lib/libpthread.so.0 (0xb7e58000)

        libpam.so.0 => /lib/libpam.so.0 (0xb7e50000)

libmysqlclient.so.15 => not found 

        libm.so.6 => /lib/libm.so.6 (0xb7e2e000)

        libz.so.1 => /lib/libz.so.1 (0xb7e1d000)

        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7dee000)

        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7cf5000)

        libdb-4.2.so => /usr/lib/libdb-4.2.so (0xb7c28000)

        libnsl.so.1 => /lib/libnsl.so.1 (0xb7c13000)

        libresolv.so.2 => /lib/libresolv.so.2 (0xb7c00000)

        libc.so.6 => /lib/libc.so.6 (0xb7af0000)

        /lib/ld-linux.so.2 (0xb7f20000)

        libdl.so.2 => /lib/libdl.so.2 (0xb7aec000)

Obviously the library is missing. What buge me is that a locate tells me that it is there:

```
foo ~ # locate libmysqlclient.so.15

/usr/lib/libmysqlclient.so.15

/usr/lib/libmysqlclient.so.15.0.0

```

 *confused*

----------

## Monkeh

Locate uses a db, normally created every night. If the file is removed, but the locate db hasn't  been updated, locate will still say it's there.

----------

## epig

*doh* (bangs head into desk*) I knew that, I just forgot.

oh well, a 

```
ln -s /usr/lib/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so.15
```

 fixed it.

Thanks for setting me straight, but should't this have been fixed in the upgrade itself? Could this be a portage bug?

----------

