Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
add comment

2 Answers 2

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
add comment

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
add comment

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.