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 ...
随机推荐
- Hibernate绑定session保证session为单线程操作
- 有哪些值得学习的spring boot开源项目?
1. awesome-spring-boot 首先给大家介绍的就是Spring Boot 中文索引,这是一个专门收集 Spring Boot 相关资料的开源项目,也有对应的导航页面. 产品主页 htt ...
- 如何访问google?
1:浏览器打开 uzer.me 网站(建议:火狐,不行就谷歌) 2:点击注册,注册一个账号 3:登录账号,进入如下界面,选择火狐浏览器 4:这样就可以进行国外的网站访问了
- gvim 常用键
按i 切换到插入模式,ESC退出 命令模式下 dd 删除一行 dw 删除一个字 x 删除一个字符 :set num 设置行号 :reg 查看寄存器 p 粘贴 y 复制 "*p 不同环境下 ...
- C++中的定位放置new(placement new)
一般来说,使用new申请空间时,是从系统的“堆”(heap)中分配空间.申请所得的空间的位置时根据当时的内存的实际使用情况决定的.但是,在某些特殊情况下,可能需要在程序员指定的特定内存创建对象,这就是 ...
- 数组Reduce的应用
数组Reduce的应用 参考 简单应用 var arr = [1,2,3,4,5] var sum = arr.reduce(function (prev, cur, index, arr) { co ...
- sublime的几款实用插件
1.CSScomb 用于调整css属性的书写顺序 2.Emmet 缩写神器 3.HTML/CSS/JS Prettify 代码格式化 4.Trimmer 去空格去空行 5.Alignment 代码对齐 ...
- 使用原生javascript实现jquery的$(function(){ })
在使用jquery的时候,经常用到$(function(){})方法或者是$(document).read(function(){})来作为页面dom节点加载完成之后javascript的执行入口,现 ...
- 责任链模式和php实现
职责链模式(又叫责任链模式): 包含了一些命令对象和一些处理对象,每个处理对象决定它能处理那些命令对象,它也知道应该把自己不能处理的命令对象交下一个处理对象,该模式还描述了往该链添加新的处理对象的方法 ...
- Sql Server RowNumber和表变量分页性能优化小计
直接让代码了,对比看看就了解了 当然,这种情况比较适合提取字段较多的情况,要酌情而定 性能较差的: WITH #temp AS ( ...