环境:
linux centos7.3
报错make install
if test "x" != "x" ; then \
rm -f /usr/local/python3/bin/python3-32; \
(cd /usr/local/python3/bin; ln -s python3.6-32 python3-32) \
fi
rm -f /usr/local/python3/share/man/man1/python3.1
(cd /usr/local/python3/share/man/man1; ln -s python3.6.1 python3.1)
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Traceback (most recent call last):
File "/root/Python-3.6.0/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/root/Python-3.6.0/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/Python-3.6.0/Lib/ensurepip/__main__.py", line 4, in <module>
ensurepip._main()
File "/root/Python-3.6.0/Lib/ensurepip/__init__.py", line 189, in _main
default_pip=args.default_pip,
File "/root/Python-3.6.0/Lib/ensurepip/__init__.py", line 102, in bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/root/Python-3.6.0/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
问题分析
从错误信息分析,就是缺少了zlib的解压缩类库,安装即可
解决:
yum -y install zlib*