Screwed libthesqlclient-dev in Ubuntu

librariesmysql5ubuntu-10.04

I have messed with symlinks and libraries in /usr/lib. I modified libraries like libmysql*. someone suggested to reinstall libmysqlclient-dev package. Is libmysqlclient-dev holding Mysql libraries?

How can I force the re-installation of libmysqlclient-dev?

I am using Ubuntu Server 10.04 and current Mysql, 5.1.x. I need to use the server to host a Rails application and I need to compile the mysql2 gem, which is failing.

UPDATE

I have removed libmysql* files and mysql directory under /usr/lib. Then I purged and reinstalled mysql server, client and libmysqlclient-dev but I get:

mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

I need to know which package install the shared libraries and how to fix it.

Best Answer

Use dpkg -S to figure out which package the file /usr/lib/libmysqlclient.so.16 is from, I don't think it's from libmysqlclient-dev, but from libmysqlclient, the dpkg -S command is to verify its origin...

Uninstall and reinstall the resulting package. After reinstall, run ldconfig to force your system to rebuild the symlink structures inside /usr/lib.

Edit

Just did a quick 10.04 install to verify. /usr/lib/libmysqlclient.so.16 comes from package libmysqlclient16. So to come back to your question: No, the package libmysqlclient-dev does not hold the libraries your are looking for.

Uninstall:

sudo apt-get purge libmysqlclient16

Install:

sudo apt-get install libmysqlclient16

The install of the package should also trigger a run of ldconfig.

Related Topic