sqlite3在centos7和python shell中运行良好,但在Uwsgi中无法运行

2024-01-12

我有一个问题需要你帮忙~

我有一个在vps(centos7,django2.2)中运行的django程序,它与Nginx + Uwsgi配合得很好。

我编辑了三个文件(如a.py b.py c.py),并通过winscp.exe上传到vps,程序现在无法运行。

我在 uwsgi.log 文件中找到了这些日志。

  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)

我在centos7 shell中写了“sqlite3 --version”,它显示版本= 3.30.1

我写了“python >>> import sqlite3 >>>print sqlite3.sqlite_version”它显示 version=3.30.1

我写了“python manage.py runserver --noreload 0.0.0.0:80”,它运行良好,没有信息显示 sqlite 错误。

但该程序无法在uwsgi中运行,我认为uwsgi.ini是正确的。

我能做些什么 ? 谢谢你!


我想我已经解决了这个问题。

在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

那么就可以了

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

sqlite3在centos7和python shell中运行良好,但在Uwsgi中无法运行 的相关文章

随机推荐