在Mac上安装了Parallels Desktop,然后安装了ubuntu16虚拟机,虚拟机中在用pyenv安装不同版本python的时候,最后失败,提示如下(部分):
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? ERROR: The Python zlib extension was not compiled. Missing the zlib?
如何解决
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
brew install readline xz
NOTE: libssl-dev is required when compiling Python, installing libssl-dev will actually install zlib1g-dev, which leads to uninstall and re-install Python versions (installed before installing libssl-dev). On Redhat and derivatives the package is named openssl-devel.
viencoding.com版权所有,允许转载,但转载请注明出处和原文链接: https://viencoding.com/article/46