Closed apatel762 closed 2 years ago
Updated the above comment to mention openssl-1.1.1n
instead of openssl-3.0.2
because 3.0.2 wasn't working for me when I tried to compile Python with it.
Just to make sure that there isn't some sort of issue with that (i.e. the OpenSSL version being too new) I'm trying to compile Python with OpenSSL 1.1.1n.
This is for my media VPS, where I don't have root access.
I needed a newer version of OpenSSL to compile Python (part of the
pyenv
setup). I wasn't able to usesudo
or becomeroot
at any point in the process, so I needed to compile and install a copy of OpenSSL and dump it somewhere in my home dir to use.I used a couple of resources: the official OpenSSL install docs[^1] and the official
pyenv
docs[^2] (which pointed to a guide[^3] online with more information)....and then once you've installed OpenSSL, put the below stuff into your bash init scripts to ensure that you are using the local version instead of the system version:
...and then use
pyenv
to compile the version of Python that you want:You can use
pyenv install -v
for more output. If the build fails, it will tell you where the log file for the build is, and you can look through that to figure out what went wrong.[^1]: GitHub openssl/openssl "Build and Install" [^3]: Dreamhost Help "Installing OpenSSL locally under your username" [^2]: GitHub pyenv/pyenv "ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?"