访问首页提示:ImportError: libmysqlclient.so.18
来源:16-1 单进程启动服务
慕数据3379218
2019-04-07
提示错误:
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 2309, in call
return self.wsgi_app(environ, start_response)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 2295, in wsgi_app
response = self.handle_exception(e)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/_compat.py”, line 35, in reraise
raise value
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 2292, in wsgi_app
response = self.full_dispatch_request()
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/_compat.py”, line 35, in reraise
raise value
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 1811, in full_dispatch_request
rv = self.preprocess_request()
File “/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py”, line 2087, in preprocess_request
rv = func()
File “/data/www/Awavava/web/interceptors/AuthInterceptor.py”, line 31, in before_request
LogService.addAccessLog()
File “/data/www/Awavava/common/libs/LogService.py”, line 21, in addAccessLog
db.session.add( target )
File “/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/orm/scoping.py”, line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/util/collections.py", line 1012, in call
return self.registry.setdefault(key, self.createfunc())
File “/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/orm/session.py”, line 3206, in call
return self.class(**local_kw)
File “/data/www/python3_vir/lib/python3.5/site-packages/flask_sqlalchemy/init.py”, line 143, in init
bind = options.pop(‘bind’, None) or db.engine
File “/data/www/python3_vir/lib/python3.5/site-packages/flask_sqlalchemy/init.py”, line 877, in engine
return self.get_engine()
File “/data/www/python3_vir/lib/python3.5/site-packages/flask_sqlalchemy/init.py”, line 896, in get_engine
return connector.get_engine()
File “/data/www/python3_vir/lib/python3.5/site-packages/flask_sqlalchemy/init.py”, line 559, in get_engine
self._engine = rv = sqlalchemy.create_engine(info, **options)
File “/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/engine/init.py”, line 423, in create_engine
return strategy.create(*args, **kwargs)
File “/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py”, line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File “/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/dialects/mysql/mysqldb.py”, line 118, in dbapi
return import(“MySQLdb”)
File “/data/www/python3_vir/lib/python3.5/site-packages/MySQLdb/init.py”, line 18, in
from . import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
-
- [07/Apr/2019 20:49:16] “GET /user/login?debugger=yes&cmd=resource&f=jquery.js HTTP/1.1” 200 -
-
- [07/Apr/2019 20:49:16] “GET /user/login?debugger=yes&cmd=resource&f=style.css HTTP/1.1” 200 -
-
- [07/Apr/2019 20:49:16] “GET /user/login?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1” 200 -
-
- [07/Apr/2019 20:49:16] “GET /user/login?debugger=yes&cmd=resource&f=console.png HTTP/1.1” 200 -
- [07/Apr/2019 20:49:16] “GET /user/login?debugger=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1” 200 -
google 了很多办法,依然没有解决,望老师能给些提示。
2回答
-
编程浪子
2019-04-08
你好
https://dev.mysql.com/downloads/mysql/5.7.html#downloads 官网这里可以在下的
00 -
编程浪子
2019-04-08
你好
你的mysql 版本是多少的?如果你的是5.7 试试 yum install mysql-community-libs-compat-5.7.18-1.el7.x86_64.rpm
012019-04-08
相似问题