运行Django项目时报错
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)
1、下载sqlite3
wget https://www.sqlite.org/2020/sqlite-autoconf-3340000.tar.gz
2、解压缩
tar -zxvf sqlite-autoconf-3340000.tar.gz
3、配置安装文件
进入文件夹
cd sqlite-autoconf-3340000.tar.gz
配置
./configure --prefix=/usr/local/sqlite3
4、编译安装
make && make install
5、软链接
删除旧的
mv /usr/bin/sqlite3 /usr/bin/sqlite3_old
创建新的(如果已存在 运行rm -rf /usr/bin/sqlite3删除)
ln -s /usr/local/sqlite3/bin/sqlite3 /usr/bin/sqlite3
生效命令
source ~/.bashrc
6、进入python3安装文件(丢失该文件,可以重新下载解压python安装文件,注意和系统已安装版本相同)
命令1:cd Python-3.6.2
命令2:LD_RUN_PATH=/usr/local/sqlite3/lib ./configure LDFLAGS="-L/usr/local/sqlite3/lib" CPPFLAGS="-I /usr/local/sqlite3/include"
命令3:LD_RUN_PATH=/usr/local/sqlite3/lib make
命令4:LD_RUN_PATH=/usr/local/sqlite3/lib sudo make install