https://blog.csdn.net/Net_div/article/details/103701592
将一些错误记录下来,以后就不要到处去找了.
作为一个对linux不敢谈了解的代码小学生,还是建议不要使用miniconda了 后续问题二的问题就是这个东东出现的,当然也有可能有其他办法解决,如果有大佬看到希望指导一下.感谢感谢!!
操作系统:阿里云Ubuntu16.0.4
python环境:Python3.6.5
Django版本:2.0.2
mysql:5.7.28-0ubuntu0.16.04.2 (Ubuntu)
虚拟环境:用的anaconda--不建议使用miniconda了,已经弃坑
uwsgi:2.0.18
nginx:nginx/1.10.3 (Ubuntu)
参考链接:https://blog.csdn.net/xiefeisd/article/details/89486934
参考链接:https://www.cnblogs.com/shanguanghui/p/8994919.html
(py3) [root@localhost ~] uwsgi
uwsgi: error while loading shared libraries: libicui18n.so.58: cannot open shared object file: No such file or directory
于是乎查看 uwsgi所在地址,然后使用 LDD 查看缺少的包
(py3) [root@localhost ~] which uwsgi
/root/anaconda3/envs/py3/bin/uwsgi
(py3) [root@localhost ~] ldd /root/anaconda3/envs/py3/bin/uwsgi
linux-vdso.so.1 => (0x00007ffc14fc7000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff6b0347000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff6b0045000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6afe40000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007ff6afbde000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007ff6af874000)
libz.so.1 => /lib64/libz.so.1 (0x00007ff6af65d000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007ff6af437000)
libicui18n.so.58 => not found
libicuuc.so.58 => not found
libicudata.so.58 => not found
libutil.so.1 => /lib64/libutil.so.1 (0x00007ff6af233000)
librt.so.1 => /lib64/librt.so.1 (0x00007ff6af02a000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff6aedf3000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff6aea30000)
/lib64/ld-linux-x86-64.so.2 (0x00005634c289c000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007ff6ae82c000)
anaconda/lib
下会有这些包,/lib/x86_64-linux-gnu/libicudata.so.58
下.完全可以到lib/
目录下看一下就知道了(py3) [root@localhost ~] ln -s /root/anaconda3/lib/libicui18n.so.58 /lib64/libicui18n.so.58
(py3) [root@localhost ~] ln -s /root/anaconda3/lib/libicuuc.so.58 /lib64/libicuuc.so.58
(py3) [root@localhost ~] ln -s /root/anaconda3/lib/libicudata.so.58 /lib64/libicudata.so.58
再次使用ldd 查看一下是否已经补全.原文中后面的问题我没有出现,先码着防止后面出错.
这是再次ldd的结果
(py3) [root@localhost ~]# ldd /root/anaconda3/envs/py3/bin/uwsgi
/root/anaconda3/envs/py3/bin/uwsgi: /lib64/./libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicui18n.so.58)
/root/anaconda3/envs/py3/bin/uwsgi: /lib64/./libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib64/libicui18n.so.58)
/root/anaconda3/envs/py3/bin/uwsgi: /lib64/./libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.58)
/root/anaconda3/envs/py3/bin/uwsgi: /lib64/./libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib64/libicuuc.so.58)
这说明还是缺失CXXABI_ 之类的东西,使用 strings 命令查看结果如下
[root@localhost lib64]# strings /usr/lib64/libstdc++.so.6|grep CXXABI
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1
确实没有CXXABI_1.3.8 CXXABI_1.3.9 之类的东西,那么就把 anaconda3 下的libstdc++.so.6移到/lib64下面, libstdc++.so.6就是libstdc++.so.6.0.24的软链(可以去/lib64下查看ll libstc*),既然确实那就把 anconda3下的高版本高 copy 过去就是
把libstdc++.so.6.0.24拷贝到/lib64目录下。
cp libstdc++.so.6.0.24 /lib64/
删除原来的libstdc++.so.6符号连接。
rm -rf libstdc++.so.6
新建新符号连接。
ln -s libstdc++.so.6.0.24 libstdc++.so.6
再次执行查看结果符合就哦了。
这样一来问题二就解决了.