sqlite3 works well in centos7 and python shell,but can't work in Uwsgi

。_饼干妹妹 提交于 2020-04-18 05:46:30

问题


I have a question need your help~

I have a django program run in a vps(centos7,django2.2),it works well with Nginx+Uwsgi.

I edit three files(like a.py b.py c.py),and upload to the vps by winscp.exe,the program can't work now.

I found these logs in the uwsgi.log file.

  File "/mnt/datasource/<privacy_hidden>/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 68, in <module>
    check_sqlite_version()
  File "/mnt/datasource/<privacy_hidden>/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 65, in check_sqlite_version
    raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version)
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).
unable to load app 0 (mountpoint='') (callable not found or import error)

I wrote "sqlite3 --version" in centos7 shell, it show version = 3.30.1

I wrote "python >>> import sqlite3 >>>print sqlite3.sqlite_version" it show version=3.30.1

I wrote "python manage.py runserver --noreload 0.0.0.0:80",it works well, no info show sqlite error.

But the program can't work in uwsgi,I think the uwsgi.ini is correct.

What can I do ? Thank you!


回答1:


I think I have solved this question.

In centos shell:

> mv /usr/lib64/libsqlite3.so.0.8.6 /usr/lib64/libsqlite3.so.0.8.6_old
> cp /usr/local/lib/libsqlite3.so.0.8.6 /usr/lib64/libsqlite3.so.0.8.6

then it's ok



来源:https://stackoverflow.com/questions/61158883/sqlite3-works-well-in-centos7-and-python-shell-but-cant-work-in-uwsgi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!