libmysqlclient_18 not defined in file libmysqlclient.so.18

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/dqchouyang/article/details/80447592

今天在部署服务器的时候,又出现了no python application found, check your startup logs for errors 的问题,之前我分享过一篇,问题是环境变量的事,但是 今天这个问题是其他的问题。看下uwsgi.log的日志信息:

File "/usr/lib/python2.7/site-packages/Django-1.8.7-py2.7.egg/django/db/backends/mysql/base.py", line 27, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: /root/.cache/Python-Eggs/MySQL_python-1.2.5-py2.7-linux-
x86_64.egg-tmp/_mysql.so: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link t
ime reference

*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 8745)
spawned uWSGI worker 1 (pid: 8752, cores: 1)
spawned uWSGI worker 2 (pid: 8753, cores: 1)
spawned uWSGI worker 3 (pid: 8754, cores: 1)
spawned uWSGI worker 4 (pid: 8755, cores: 1)
*** Stats server enabled on /tmp/uwsgi.socket fd: 21 ***
spawned uWSGI http 1 (pid: 8756)
--- no python application found, check your startup logs for errors ---
--- no python application found, check your startup logs for errors ---

centos7.4的系统里报这个问题,其实是一个文件没有找到的问题,解决的命令如下:

ln -s /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18

使用mysql数据库的话,要安装一下依赖的系统包 yum install mysql-devel
如果不全的话,可以yum install mysql*

猜你喜欢

转载自blog.csdn.net/dqchouyang/article/details/80447592
今日推荐