原文:https://www.cnblogs.com/leffss/p/11555556.html
问题
在 centos 7 上面运行 django 2.2 开发服务器时出现:
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).
原因时系统自带 sqlite3 版本太低,解决方法是升级就可以了。
升级
下载源码
wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz # 这个地址貌似不对
wget http://www.sqlite.org/2015/sqlite-autoconf-3081101.tar.gz # 这个可以
编译
tar zxvf sqlite-autoconf-3290000.tar.gz
cd sqlite-autoconf-3290000/
./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
记得source
vim ~/.bashrc
export LD_LIBRARY_PATH="/usr/local/lib"
source ~/.bashrc
再次启动运行 django 2.2 开发服务器就 ok 了。
云盘有链接
二 升级redis
参考:https://blog.csdn.net/u012150590/article/details/79851231
#命令
yum -y remove redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis -y
#启动并查看版本
rpm -qa | grep redis
systemctl start redis
systemctl enable redis
推荐源码地址
https://github.com/shiyunbo/django-channels-chatbot/
最终linux下启动的freeze依赖包
aioredis==1.3.1
amqp==5.0.6
asgiref==3.3.4
async-timeout==3.0.1
attrs==21.2.0
autobahn==21.2.1
Automat==20.2.0
billiard==3.6.4.0
celery==5.0.5
certifi==2020.12.5
cffi==1.14.5
channels==3.0.3
channels-redis==3.2.0
chardet==4.0.0
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
constantly==15.1.0
cryptography==3.4.7
cssselect==1.1.0
daphne==3.0.2
Django==3.2.3
dnspython==1.16.0
eventlet==0.31.0
greenlet==1.1.0
hiredis==2.0.0
hyperlink==21.0.0
idna==2.10
importlib-metadata==4.8.2
incremental==21.3.0
kombu==5.0.2
lxml==4.6.3
msgpack==1.0.2
parsel==1.6.0
prompt-toolkit==3.0.18
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
pyOpenSSL==20.0.1
pytz==2021.1
redis==3.5.3
requests==2.25.1
service-identity==21.1.0
six==1.16.0
sqlparse==0.4.1
Twisted==21.7.0
txaio==21.2.1
typing-extensions==3.10.0.2
urllib3==1.26.4
vine==5.0.0
w3lib==1.22.0
wcwidth==0.2.5
zipp==3.6.0
zope.interface==5.4.0