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 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.

share|improve this question
    
Can you locate your the mentioned library? Use: sudo updatedb. Then, use: locate libmysqlclient.so. –  Khaled Dec 10 '11 at 10:48

3 Answers 3

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.

share|improve this answer

The libmysqlclient-dev library contains the development files (headers) which are usually stored under /usr/include/. Here, you can see that most of the files provided are .h files. Such a library is useful when you want to build an application from source.

You can try to remove the package and reinstall it again. It did not work, you may need to try fixing what you have done manually.

$ sudo apt-get purge libmysqlclient-dev    # remove completely with configs
$ sudo apt-get install libmysqlclient-dev
share|improve this answer

These are the install commands for Ubuntu for installing MySQL with Ruby.

sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql

Referenced from Ubuntu community site: https://help.ubuntu.com/community/RubyOnRails

share|improve this answer
    
this does not answer to my question by thank you. I am using mysql2 gem, Ubuntu old ruby packages and informations. –  rtacconi Dec 10 '11 at 10:19

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.