More news
I can't run import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 19, in
<module>
File "build/bdist.linux-x86_64/egg/_mysql.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/_mysql.py", line 6, in
__bootstrap__
ImportError: libmysqlclient.so.16: cannot open shared object file: No
such file or directory
I can't install python-mysql from aptitude or apt-get as it will
install mysql-common, which will seriously fuck with my mysql install,
as I found out a little earlier :-)
Ubuntu10
On Mar 1, 10:31 am, vanderkerkoff <ton...@gmail.com> wrote:
> Hi everyone
>
> This is completely driving me crazy :-)
>
> I've installed(reinstalled many times) mysql5.5.9 from source,
> followed this guys instructions
>
> http://greensysadmin.com/2011/01/24/mysql-5-5-installing-from-source-...
>
> Then downloaded and installed django1.2.4 from source
>
> Then downloaded MySQL-Python and installed that, after changing and
> uncommenting this line in site.cfg
>
> mysql_config = /usr/local/mysql/bin/mysql_config
>
> When I try and run a django app, it says
>
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: libmysqlclient.so.16: cannot open shared object file: No such
> file or directory
>
> That file is present in /usr/local/mysql/lib
>
> I've installed, reinstalled, all of the above, and it's still doing
> this, I have no idea why
>
> Can anyone help? You may have guessed but it's bugging the sh*t out
> of me at the moment :-)
>
> Any help, as always, greatly appreciated.
This has been true for many years; if you install libraries to
locations outside of your OS's LD_LIBRARY_PATH, you're responsible for
ensuring that the linker/rtld has enough information to use it. man
rtld/ld.so/ld
In fact, whilst installing MySQL 5.5 from source, the following
message is emitted (obviously, the location is different):
Libraries have been installed in:
/usr/local/lib/mysql
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
Cheers
Tom