0

I use Ubuntu 18.04. It was shipped with OpenSSL 1.1.0g . I tried to link manually compiled Python to a manually compiled OpenSSL1.1.1a but things does not seem to work well. When I now run Python it is automatically linked to OpenSSL1.1.1a. I want to revert this. I want to restore OpenSSL1.1.0g as the default library for my system and my system's installed python. When I check my system's OpenSSL version I get:

OpenSSL 1.1.0g  2 Nov 2017 (Library: OpenSSL 1.1.1a  20 Nov 2018)

When I check:

whereis openssl

I get:

openssl: /usr/bin/openssl /usr/include/openssl /usr/local/openssl /usr/local/openssl/bin/openssl /usr/share/man/man1/openssl.1ssl.gz

How can I remove OpenSSL 1.1.1a and just leave the system's OpenSSL 1.1.0g? How can I make Python linked to OpenSSL 1.1.0g? Any Python is linked to OpenSSL 1.1.1a now.

EDIT:

The command I used to compile python and openssl is similar to (except different versions):

# new openssl install
curl https://www.openssl.org/source/openssl-1.0.2g.tar.gz | tar xz && cd openssl-1.0.2g && ./config shared --prefix=/usr/local/ && make && make install

# Python install script
export LDFLAGS="-L/usr/local/lib/"
export LD_LIBRARY_PATH="/usr/local/lib/"
export CPPFLAGS="-I/usr/local/include -I/usr/local/include/openssl"
apt-get update
apt-get install build-essential checkinstall -y
apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
cd /home/web/
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz | tar xzf Python-2.7.11.tgz && cd Python-2.7.11 
./configure --prefix=/usr/local/ 
make altinstall
0

First you need to uninstall the manually compiled version of OpenSSL 1.1.1a. Assuming you've kept the build directory, this is as simple as running make uninstall in that folder. After successfully completing that, you need to reinstall the Ubuntu package using apt-get install --reinstall openssl.

3
  • Can you plz clarify what do you mean by build directory? Is it the directory of the source code? Mar 15 '19 at 8:40
  • I edited my question. Can you specify where shall I run the make uninstall as it is not clear to me what do you mean by build directory. Mar 15 '19 at 8:47
  • Your third line from the bottom says cd Python-2.7.11, followed by ./configure --prefix=/usr/local and make altinstall. This means that the last two commands were executed in that directory. Run make uninstall in the same directory (Python-2.7.11).
    – oddbjorn
    Mar 15 '19 at 11:37

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.