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.
Use
dpkg -S
to figure out which package the file/usr/lib/libmysqlclient.so.16
is from, I don't think it's fromlibmysqlclient-dev
, but fromlibmysqlclient
, thedpkg -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 packagelibmysqlclient16
. So to come back to your question: No, the packagelibmysqlclient-dev
does not hold the libraries your are looking for.Uninstall:
Install:
The install of the package should also trigger a run of
ldconfig
.These are the install commands for Ubuntu for installing MySQL with Ruby.
Referenced from Ubuntu community site: https://help.ubuntu.com/community/RubyOnRails
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.