0

To install Python from source without root permission, I had to install openssl, which I did using the following commands:

wget https://www.openssl.org/source/openssl-1.1.1e.tar.gz
tar -xzvf openssl-1.1.1e.tar.gz
cd openssl-1.1.1e
./config --prefix=${HOME}/.local/openssl --openssldir=${HOME}/.local/openssl
make -j$(nproc)
make install_sw

Then I set the following in ~/.bashrc:

export PATH=$HOME/.local/openssl/bin:$PATH
export LD_LIBRARY_PATH=$HOME/.local/openssl/lib:$LD_LIBRARY_PATH

After this, I can no longer use wget like before:

ERROR: cannot verify github.com's certificate, issued by ‘CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
  Unable to locally verify the issuer's authority.
To connect to github.com insecurely, use `--no-check-certificate'.

And it seems that any connection that requires a certificate will fail.

My question is how to make custom, local installation of openssl works flawlessly (maybe by importing existing certificates and put them in the right place?).

Thank you very much in advance for your help!

1
./config --prefix=${HOME}/.local/openssl --openssldir=${HOME}/.local/openssl

--openssldir specifies the directory for openssl configuration files which also is the directory where it looks for CA certificates by default. Thus you should either reuse the existing OPENSSLDIR on your system by symlinking your ${HOME}/.local/openssl to it or copy your systems CA certificates into the new directory from the systems one. The OPENSSLDIR for the default openssl installation on your system depends on your (unknown) system but it might be something like /usr/lib/ssl.

| improve this answer | |
  • Thanks. Indeed, I created a symbolic link in from the certs folder of the new installation to the existing one: ln -s /etc/ssl/certs $HOME/.local/openssl/certs and it worked! – Khue Mar 19 at 9:50
  • Everything seems to work, except that I still have an issue with my Python installation :( I posted another question here: unix.stackexchange.com/q/573746/214821 It would be very much appreciated if you could help as well. Thank you very much! – Khue Mar 19 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.