Wednesday, March 2, 2011

Re: mysql MySQL-python and libmysqlclient.so.16 hell

Thanks Graham

I went for the first option and added the path to my mysql libraries
to /etc/ld.so.conf

Never had to do that before though, and I've installed this type of
system many many times. This one is newer ubuntu and newer mysql
though, must be a change in that.

Thanks again

Matt


On Mar 1, 11:35 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> On Tuesday, March 1, 2011 9:38:33 PM UTC+11, vanderkerkoff wrote:
>
> > 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.
>
> The libmysqlclient.so file is not installed in a directory which is part of
> the standard search path for shared libraries on your system.
>
> You will need to either update /etc/ld.so.conf so as to include the
> directory or when your build the code which is dependent upon it, set the
> LD_RUN_PATH environment variable to list the directory where the library
> will be installed.
>
> Go do some reading about ldconfig and LD_RUN_PATH.
>
> You can also set LD_LIBRARY_PATH to list the directory where library
> installed if just using development server or command line Python, but that
> isn't the best solution if need to later deploy under Apache as it doesn't
> use LD_LIBRARY_PATH from your user account.
>
> Graham

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment