asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
656 stars 56 forks source link

ERROR: The Python ssl extension was not compiled when attempting to install Python 3.3.6 #74

Closed MinorProphet closed 4 years ago

MinorProphet commented 4 years ago

I encountered the "ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?" and I couldn't solve it by following the common build problems solutions on the wiki.

$ asdf install python 3.3.6
python-build 3.3.6 $HOME/.asdf/installs/python/3.3.6
Downloading Python-3.3.6.tar.xz...
-> https://www.python.org/ftp/python/3.3.6/Python-3.3.6.tar.xz
Installing Python-3.3.6...
patching file ./Lib/ssl.py
patching file ./Modules/_ssl.c
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/pyenv/pyenv/wiki/Common-build-problems

BUILD FAILED (Ubuntu 20.04 using python-build 1.2.20-3-g58c776a1)

Inspect or clean up the working tree at /tmp/python-build.20200824193848.103398
Results logged to /tmp/python-build.20200824193848.103398.log

Last 10 log lines:
rm -f $HOME/.asdf/installs/python/3.3.6/bin/idle3
(cd $HOME/.asdf/installs/python/3.3.6/bin; ln -s idle3.3 idle3)
rm -f $HOME/.asdf/installs/python/3.3.6/bin/pydoc3
(cd $HOME/.asdf/installs/python/3.3.6/bin; ln -s pydoc3.3 pydoc3)
rm -f $HOME/.asdf/installs/python/3.3.6/bin/2to3
(cd $HOME/.asdf/installs/python/3.3.6/bin; ln -s 2to3-3.3 2to3)
rm -f $HOME/.asdf/installs/python/3.3.6/bin/pyvenv
(cd $HOME/.asdf/installs/python/3.3.6/bin; ln -s pyvenv-3.3 pyvenv)
rm -f $HOME/.asdf/installs/python/3.3.6/share/man/man1/python3.1
(cd $HOME/.asdf/installs/python/3.3.6/share/man/man1; ln -s python3.3.1 python3.1)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal
$ which python3
$HOME/.asdf/shims/python3
$ asdf --version
v0.8.0-rc1-e0142ee
$ asdf list python
  3.8.5
$ asdf plugin list --refs
python                       master b544ac9
$ sudo apt-get install -y 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
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1).
git is already the newest version (1:2.25.1-1ubuntu3).
libbz2-dev is already the newest version (1.0.8-2).
libffi-dev is already the newest version (3.3-4).
libncurses5-dev is already the newest version (6.2-0ubuntu2).
libncursesw5-dev is already the newest version (6.2-0ubuntu2).
libreadline-dev is already the newest version (8.0-4).
libssl-dev is already the newest version (1.1.1f-1ubuntu2).
wget is already the newest version (1.20.3-1ubuntu1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1).
llvm is already the newest version (1:10.0-50~exp1).
python-openssl is already the newest version (19.0.0-1build1).
tk-dev is already the newest version (8.6.9+1).
curl is already the newest version (7.68.0-1ubuntu2.2).
liblzma-dev is already the newest version (5.2.4-1ubuntu1).
libsqlite3-dev is already the newest version (3.31.1-4ubuntu0.2).
xz-utils is already the newest version (5.2.4-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get install libssl1.0-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libssl1.0-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libssl1.0-dev' has no installation candidate
MinorProphet commented 4 years ago

Installing Python 3.5.0 produces a similar error. Installing 3.6.0 works like a charm:

$ asdf install python 3.5.0
python-build 3.5.0 $HOME/.asdf/installs/python/3.5.0
Downloading Python-3.5.0.tar.xz...
-> https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
Installing Python-3.5.0...
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/pyenv/pyenv/wiki/Common-build-problems

BUILD FAILED (Ubuntu 20.04 using python-build 1.2.20-3-g58c776a1)

Inspect or clean up the working tree at /tmp/python-build.20200824231621.215456
Results logged to /tmp/python-build.20200824231621.215456.log

Last 10 log lines:
(cd $HOME/.asdf/installs/python/3.5.0/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 7.1.2 requires SSL/TLS
$ asdf install python 3.6.0
python-build 3.6.0 $HOME/.asdf/installs/python/3.6.0
Downloading Python-3.6.0.tar.xz...
-> https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
Installing Python-3.6.0...
Installed Python-3.6.0 to $HOME/.asdf/installs/python/3.6.0
$ asdf list python
  3.6.0
  3.8.5
MinorProphet commented 4 years ago

This is a possible instance of this issue:

https://github.com/pyenv/pyenv/issues/945

danhper commented 4 years ago

Hi, thanks for reporting. This plugin is mostly a wrapper of pyenv, so tracking the upstream issue is probably the only thing to do. I'll close here but feel free to comment if you think something could be done on this plugin's side.

sg552 commented 1 year ago

any updates?

mcandre commented 1 year ago

Same behavior with Python 3.11.2 in WSL.