uwsgs loading shared libraries: libicui18n.so.58 异常处理
背景
- 想使用 ningx + uwsgi + flask 搭建 python 应用环境
- Python使用的是anaconda3(pyhton 3.6)
- 依赖包安装完毕,但是执行 uwsgi 的时候出现如下异常
(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)
通过 LDD 发现 uwsgi 找不到三个包(具体就是 not found 的三个)
于是就把anaconda3/lib 下相应的包软链到/lib64下去(64bit 机器,如果时32bit 机器则软链到/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 测试结果如下
(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
再次执行查看结果符合就哦了。
(py3) [root@localhost lib64]# uwsgi
*** Starting uWSGI 2.0.17 (64bit) on [Fri May 4 16:07:20 2018] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-16) on 02 May 2018 11:23:18
os: Linux-3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017
nodename: localhost
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 6
current working directory: /usr/lib64
detected binary path: /root/anaconda3/envs/py3/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 4096
your memory page size is 4096 bytes
detected max file descriptor number: 65536
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
The -s/--socket option is missing and stdin is not a socket.
uwsgs loading shared libraries: libicui18n.so.58 异常处理的更多相关文章
- 解决ffmpeg执行报错“ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory”的问题
问题现象: 执行ffmpeg命令后报错: ffmpeg: error : cannot open shared object file: No such file or directory 出问题的环 ...
- ggsci: error while loading shared libraries: libnnz11.so
[oracle@localhost goldengate]$ ./ggsci ./ggsci: error while loading shared libraries: libnnz11.so: c ...
- ogg-./ggsci ./ggsci: error while loading shared libraries: libnnz11.so:
测试环境,安装linux 0gg,解压介质后./ggsci无法使用,提示目录不存在 原来是环境变量导致的问题: 1.报错现象 [ogg@enmo ogg]$ ./ggsci ./ggsci: erro ...
- linux使用wkhtmltopdf报错error while loading shared libraries:
官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
- error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server: /home/zabbix-server/sbin/zab ...
- 错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
执行以下代码,生成唯一的UID $fp = popen("/xxx/bin/tools/uuidgen system", "r");// $uid = frea ...
- ebs r12 -- adadmin: error while loading shared libraries: libclntsh.so.10.1
安装EBS R12.2增加中文字符集时,运行$AU_TOP/bin/adadmin出错: $ adadmin adadmin: error while loading shared libraries ...
- 【转】error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
错误信息: /usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libevent-2.0.so.5: c ...
随机推荐
- iOS 在UITextView中查找某个Range所在的Rect
代码如下(Swift 4): extension UITextView { /// 查找文本范围所在的矩形范围 /// /// - Parameter range: 文本范围 /// - Return ...
- (024)[工具软件]截屏录屏软件FSCapture(转)
该软件比 Snipaste 增加的功能有滚动截图和屏幕录制. 原文地址:https://www.appcgn.com/faststone-capture.html FastStoneCapture,简 ...
- leetcode315 Count of Smaller Numbers After Self
思路: bit + 离散化. 实现: #include <bits/stdc++.h> using namespace std; class Solution { public: int ...
- 用JS获取Html中所有图片文件流然后替换原有链接
function displayHtmlWithImageStream(bodyHtml) { var imgReg = /<img.*?(?:>|\/>)/gi; var arr ...
- 接口自动化- 基于 Python
准备工作 这部分其实在谷歌或者百度上搜索下就可以完成的,可是我就是想再啰嗦一遍,说不定有比我更懒的同学呢哈哈~ 第一步 Python的安装配置 打开官网: https://www.python.org ...
- SEO 第十章
SEO第十章 本次课目标: 1. 站外优化方案计划 2. 常见的SEO作弊手段(黑帽) 3. 百度站长平台的使用 4. 网站流量提升和转化率提升 一.站外优化方案计划 友情链接 权重相当.行业 ...
- Android接入支付宝和微信支付
然后把下载下来的aar包,放到项目目录下面的libs目录下,通过下面的gradle依赖进来 // 支付宝 SDK AAR 包所需的配置compile(name: 'alipaySdk-15.6.0-2 ...
- Codeforces 1076D——最短路算法
题目 给你一个有n个顶点.m条边的无向带权图.需要擦除一些边使得剩余的边数不超过k,如果一个点在原始图到顶点1的最短距离为d,在删边后的图中到顶点的最短距离仍是d,则称这种点是 good.问如何删边, ...
- 封装addClass 、 removeClass
<script> window.onload = function() { var oDiv = document.getElementById('div1'); var oDiv2 = ...
- 联玛客(T 面试)
我看你写的项目都是SSM架构,那我们就来聊下Spring 1.Spring的生命周期,与生命周期相关的事件? 2.阿里巴巴开发手册中的规范有哪些? 切到了异常捕捉话题 3.线程你有了解吗? 创建线程的 ...