Loading... ## 问题 在 centos 7 上面运行 django 3.2 开发服务器时出现: ``` django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17). ``` 原因时系统自带 sqlite3 版本太低,解决方法是升级就可以了。 ## 升级 由于 Centos 7 的 yum 源中 sqlite 版本过低,无法直接 yum update,所以才取编译升级。 ``` # 下载源码 wget https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz # 编译 tar zxvf sqlite-autoconf-3360000.tar.gz cd sqlite-autoconf-3360000 ./configure --prefix=/usr/local make && make install # 替换系统低版本 sqlite3 mv /usr/bin/sqlite3 /usr/bin/sqlite3_old ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3 echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf ldconfig sqlite3 -version ``` 再次启动运行 django 开发服务器就 ok 了。 最后修改:2021 年 07 月 04 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏