Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
2010-02-05 11:44
981 查看
装python + apache + django过程中真是一个问题加一个问题啊,刚刚解决完一个,又来一个
Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
后来上网找了半天 看到 http://sourceforge.net/projects/mysql-python/forums/forum/70461/topic/3450226
有这么一个回复
nstead of changing your LD_LIBRARY_PATH you should set
"runtime_library_dirs" to point to your library path on the destination
system in the setup_posix.py
before
compiling.
eg. like this:
Code:
尝试之,未果,又在JAVAEYE一个关于C连MYSQL的错误的文章中看到 这样的描述 在Linux下C连接MySQL出现问题如下:
编译成功后,运行程序,出现./connect: error while loading shared libraries:
libmysqlclient.so.15: cannot open shared object file: No such file or directory.
出现上面的错误是因为系统运行的时候没有找到程序运行所需要的libmysqlclient.so.15运行库文件,解决方法有两个:
方法一:直接把libmysqlclient.so.15这个文件拷贝到系统指定的/usr/lib库文件目录中。
方法二:设置/etc/ld.so.conf文件,编辑该文件,在文件中加入libmysqlclient.so.15所在目录,保存退出。
需要注意的是,每次改动ld.so.conf之后需要运行ldconfig来确认刷新。
方法三:Add /usr/local/mysql/lib/mysql to you LD_LIBRARY_PATH environment variable
于是得到启发,按照上面的方法一试,OK,通过!
Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
后来上网找了半天 看到 http://sourceforge.net/projects/mysql-python/forums/forum/70461/topic/3450226
有这么一个回复
nstead of changing your LD_LIBRARY_PATH you should set
"runtime_library_dirs" to point to your library path on the destination
system in the setup_posix.py
before
compiling.
eg. like this:
Code:
ext_options = dict( name = "_mysql", library_dirs = library_dirs, runtime_library_dirs = library_dirs, libraries = libraries, extra_compile_args = extra_compile_args, include_dirs = include_dirs, extra_objects = extra_objects, define_macros = define_macros, ) return metadata, ext_options
尝试之,未果,又在JAVAEYE一个关于C连MYSQL的错误的文章中看到 这样的描述 在Linux下C连接MySQL出现问题如下:
编译成功后,运行程序,出现./connect: error while loading shared libraries:
libmysqlclient.so.15: cannot open shared object file: No such file or directory.
出现上面的错误是因为系统运行的时候没有找到程序运行所需要的libmysqlclient.so.15运行库文件,解决方法有两个:
方法一:直接把libmysqlclient.so.15这个文件拷贝到系统指定的/usr/lib库文件目录中。
方法二:设置/etc/ld.so.conf文件,编辑该文件,在文件中加入libmysqlclient.so.15所在目录,保存退出。
需要注意的是,每次改动ld.so.conf之后需要运行ldconfig来确认刷新。
方法三:Add /usr/local/mysql/lib/mysql to you LD_LIBRARY_PATH environment variable
于是得到启发,按照上面的方法一试,OK,通过!
相关文章推荐
- 报错:/application/zabbix/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
- ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
- ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
- 遇到了ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
- ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
- error while loading shared libraries: libmysqlclient_r.so.16: cannot open shared object file: No suc
- ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory
- uwsgi部署web,error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
- 报错 mysql: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
- error while loading shared libraries: libtest.so: cannot open shared object file: No such file or directory
- python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
- mkubimage-mlc2: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: No such file or directory
- nginx启动报错:/usr/local/nginx/sbin/nginx: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
- error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory .
- ./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory
- error while loading shared libraries: lib******: cannot open shared object file: No such file or directory
- python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
- sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
- gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
- Yolo 9000:OSError: libdarknet.so: cannot open shared object file: No such file or directory