Error: Missing the OpenSSL lib? while trying to install python
Solution 1
Python makes use of underlying operating system libraries to support some of its libraries, and it appears you don't have these libraries installed. On Ubuntu you should be able to install them with
$ sudo apt-get install bzip2 libreadline6 libreadline6-dev openssl
For SUSE 12, as you have pointed out, the command required was
zypper -n install openssl libopenssl-devel
Solution 2
There is an official guide for troubleshooting build problems here https://github.com/pyenv/pyenv/wiki/common-build-problems
So for openSuse you must first install the dependencies with:
zypper in zlib-devel bzip2 libbz2-devel libffi-devel libopenssl-devel \
readline-devel sqlite3 sqlite3-devel xz xz-devel
And also for Ubuntu/Debian:
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 libffi-dev liblzma-dev python-openssl git
Solution 3
In addition to the above answer I had to:
sudo apt-get install python-openssl
Solution 4
sudo apt install libssl1.0-dev
helped me
Solution 5
For me nothing from the above worked on Ubuntu 18.04.I had openssl and openssl-dev along with python-openssl.But It worked with openssl1.0-dev so:
$ sudo apt-get install openssl1.0-dev
Vignesh Paramasivam
Software Tester Passionate tester convinced to learn, practice, & explore.
Updated on July 27, 2022Comments
-
Vignesh Paramasivam over 1 year
I have tried installing python in pyenv env, in which i am getting the below error. I have added openssl to the path variable as openssl is already available, still it is throwing the same error.
Also, now tried with a separate user(not root). Same error! And tried to followup the wiki page, but for OpenSUSE i can't find much help on google too.
Can some one guide me on how to proceed this further.
xxxxx@xxxxxxxxxxx:~/.pyenv> pyenv install 3.5.2 Downloading Python-3.5.2.tar.xz... -> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz Installing Python-3.5.2... WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? Please consult to the Wiki page to fix the problem. https://github.com/yyuu/pyenv/wiki/Common-build-problems BUILD FAILED (SLES 12.1 using python-build 20160726) Inspect or clean up the working tree at /tmp/python-build.20160801100205.31144 Results logged to /tmp/python-build.20160801100205.31144.log Last 10 log lines: (cd /home/xxxxx/.pyenv/versions/3.5.2/share/man/man1; ln -s python3.5.1 python3.1) if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS