mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 14:53:53 -05:00
openssl: +subheaders
@@ -176,29 +176,29 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
|
|
||||||
## ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
|
## ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
|
||||||
|
|
||||||
0. First, check
|
### 0. First, check
|
||||||
* if you actually have OpenSSL and its headers installed (and for the right architecture and ecosystem if there are more than one at your machine)
|
* if you actually have OpenSSL and its headers installed (and for the right architecture and ecosystem if there are more than one at your machine)
|
||||||
* if the problem is resolved by upgrading Pyenv to the latest release and to the head version
|
* if the problem is resolved by upgrading Pyenv to the latest release and to the head version
|
||||||
|
|
||||||
1. **OpenSSL is installed to an uncommon location.**
|
### 1. **OpenSSL is installed to an uncommon location.**
|
||||||
|
|
||||||
Pass the location of its headers and libraries explicitly:
|
Pass the location of its headers and libraries explicitly:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
CPPFLAGS="-I<openssl install prefix>/include" \
|
CPPFLAGS="-I<openssl install prefix>/include" \
|
||||||
LDFLAGS="-L<openssl install prefix>/lib" \
|
LDFLAGS="-L<openssl install prefix>/lib" \
|
||||||
pyenv install -v <python version>
|
pyenv install -v <python version>
|
||||||
```
|
```
|
||||||
|
|
||||||
or, alternatively, [for Python 3.7+](https://bugs.python.org/issue32598), instead of `CPPFLAGS` and `LDFLAGS`:
|
or, alternatively, [for Python 3.7+](https://bugs.python.org/issue32598), instead of `CPPFLAGS` and `LDFLAGS`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
CONFIGURE_OPTS="--with-openssl=<openssl install prefix>"
|
CONFIGURE_OPTS="--with-openssl=<openssl install prefix>"
|
||||||
```
|
```
|
||||||
|
|
||||||
E.g. (invocations that worked for various people):
|
E.g. (invocations that worked for various people):
|
||||||
|
|
||||||
* RHEL6:
|
* RHEL6:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
CPPFLAGS=-I/usr/include/openssl \
|
CPPFLAGS=-I/usr/include/openssl \
|
||||||
@@ -206,7 +206,7 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
pyenv install -v 3.4.3
|
pyenv install -v 3.4.3
|
||||||
```
|
```
|
||||||
|
|
||||||
* Arch Linux:
|
* Arch Linux:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
LDFLAGS="-L/usr/lib/openssl-1.0" \
|
LDFLAGS="-L/usr/lib/openssl-1.0" \
|
||||||
@@ -214,7 +214,7 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
pyenv install -v 3.4.3
|
pyenv install -v 3.4.3
|
||||||
```
|
```
|
||||||
|
|
||||||
* If you installed openssl with macports:
|
* If you installed openssl with macports:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
CPPFLAGS="-I/opt/local/include/" \
|
CPPFLAGS="-I/opt/local/include/" \
|
||||||
@@ -222,7 +222,7 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
pyenv install -v 3.4.3
|
pyenv install -v 3.4.3
|
||||||
```
|
```
|
||||||
|
|
||||||
* On Ubuntu 14.04 on Dreamhost, an extra flag is required for Python 3.7+:
|
* On Ubuntu 14.04 on Dreamhost, an extra flag is required for Python 3.7+:
|
||||||
* First, follow these instructions: https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username
|
* First, follow these instructions: https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username
|
||||||
* Then, run:
|
* Then, run:
|
||||||
```sh
|
```sh
|
||||||
@@ -232,16 +232,16 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
pyenv install -v 3.7.2
|
pyenv install -v 3.7.2
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Your OpenSSL version is incompatible with the Python version you're trying to install**
|
### 2. **Your OpenSSL version is incompatible with the Python version you're trying to install**
|
||||||
|
|
||||||
Old Python versions (generally, <3.5 and <2.7.13) require OpenSSL 1.0 while newer systems provide 1.1, and vice versa.
|
Old Python versions (generally, <3.5 and <2.7.13) require OpenSSL 1.0 while newer systems provide 1.1, and vice versa.
|
||||||
Note that OpenSSL 1.0 is EOL and by now practically unusable on the Internet due to using obsolete standards.
|
Note that OpenSSL 1.0 is EOL and by now practically unusable on the Internet due to using obsolete standards.
|
||||||
|
|
||||||
Install the right OpenSSL version and point the build to its location as per above if needed.
|
Install the right OpenSSL version and point the build to its location as per above if needed.
|
||||||
|
|
||||||
E.g.:
|
E.g.:
|
||||||
|
|
||||||
* 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`.
|
* 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`.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get remove libssl-dev
|
sudo apt-get remove libssl-dev
|
||||||
@@ -251,9 +251,9 @@ MACOSX_DEPLOYMENT_TARGET=10.14
|
|||||||
|
|
||||||
https://github.com/pyenv/pyenv/issues/945#issuecomment-409627448 has a more complex workaround that preserves `libssl-dev`.
|
https://github.com/pyenv/pyenv/issues/945#issuecomment-409627448 has a more complex workaround that preserves `libssl-dev`.
|
||||||
|
|
||||||
* On FreeBSD 10-RELEASE and 11-CURRENT, you may need to recompile ``security/openssl`` without SSLv2 support. (See [#464](https://github.com/yyuu/pyenv/issues/464#issuecomment-152821922)).
|
* On FreeBSD 10-RELEASE and 11-CURRENT, you may need to recompile ``security/openssl`` without SSLv2 support. (See [#464](https://github.com/yyuu/pyenv/issues/464#issuecomment-152821922)).
|
||||||
|
|
||||||
* On Debian Jessie, you can use backports to install OpenSSL 1.0.2: `sudo apt -t jessie-backports install openssl`
|
* On Debian Jessie, you can use backports to install OpenSSL 1.0.2: `sudo apt -t jessie-backports install openssl`
|
||||||
|
|
||||||
## python-build: definition not found
|
## python-build: definition not found
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user