python3.5 源码安装走过的坑
报错一 python3.5 使用压缩的时候提示没有zlib模块。
1 | File "1.py", line 6, in <module> |
解决办法
先按照zlib模块,在编译安装
1 | yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y |
执行命令继续报错
1 | python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory |
解决办法
1 | echo /data/app/python3/lib/ >> /etc/ld.so.conf.d/local.conf |