8

P4Python does not work on Ubuntu 16.04 since the distribution comes with OpenSSL 1.1.0g.(details). I am trying to build P4Python from source using --ssl path/to/openssl1.0. I need to install OpenSSL 1.0.2 along with the default version of OpenSSL. (Not sure if something would break if I downgrade OpenSSL). How do I install the older version of OpenSSL so that I can just use it for building P4Python?

0

2 Answers 2

5

This article has a complete answer: https://www.miguelvallejo.com/tag/installing-openssl-1-0-2g-on-ubuntu/

Reformatted slightly:

cURL Method


# (Install cURL library)  
sudo apt-get install php5-curl 

# (Install compiling library Make)  
sudo apt-get install make 

# (single command that will download latest binaries, extract them, cd into the directory, compile configuration and then install the files)  
curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xz && cd openssl-1.0.2l && sudo ./config && sudo make && sudo make install 

# (This will create a sym link to the new binaries)  
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl` 

# (Used to check the version of the Current OpenSSL binaries)  
openssl version -v 

wget method

# (Install compiling library Make)  
sudo apt-get install make 

# (Download the latest OpenSSL 1.0.2g binaries)  
wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz 

# (Extract the tar ball to the local directory)  
tar -xzvf openssl-1.0.2l.tar.gz 

# (Enter extracted OpenSSL directory)  
cd openssl-1.0.2l 

#  (Configure binaries for compiling)  
sudo ./config

# (install configured binaries)  
sudo make install 

# (This will create a sym link to the new binaries)  
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl` 

# (Used to check the version of the Current OpenSSL binaries)  
openssl version -v 
1
  • Followed these instructions but at the end I get "Command 'openssl' not found, but can be installed with: sudo apt install openssl"
    – user997112
    May 25 at 1:28
0

You can try the following:

sudo apt-get install -y --allow-downgrades openssl1.0=1.0.2n-1ubuntu5.1 
echo "export OPENSSL_DIR=/usr/lib/ssl1.0/" >> ~/.bashrc
1
  • 1
    It is not safe to downgrade OpenSSL to a 1.0.x version because many things will fail to build or operate properly. If you need a different OpenSSL, I would suggest that you use a VM or container of the older Ubuntu with the older OpenSSL to do this, rather than downgrade your OpenSSL in this manner.
    – Thomas Ward
    Oct 4, 2018 at 13: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.