I keep getting this error when trying to install any version of Python 2.7.x using asdf
version manager on Ubuntu 18.04. I have googled but there's a lot of answers that don't work. How can I solve it?
At the end of the error there's a link to this page
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
When you open that page it has first some solutions for Other *nix systems but for ubuntu you need to look deeper:
On Debian stretch (and Ubuntu bionic), libssl-dev is OpenSSL 1.1.x, but support for that was only added in Python 2.7.13, 3.5.3 and 3.6.0. To install earlier versions, you need to replace libssl-dev with libssl1.0-dev. This is being tracked in https://github.com/pyenv/pyenv/issues/945.
So if you don't need a specific version of 2.7 you can go ahead and install 2.7.13 and the error will not appear. Or you can replace the library when installing dependencies.
sudo apt-get install -y make build-essential libssl1.0-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With