Report this

What is the reason for this report?

How do I upgrade openssl version in my digital ocean droplet?

Posted on December 10, 2024

I am using openssl in a Codeigniter 4 project (php-7.4) running on apache server. The project requires the system to have openssl version v3.2.0. When I check the installed openssl version in the droplet I see v3.0.2. How do I upgrade the version of openssl working on digital ocean droplet.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Confirm the version of OpenSSL installed:

openssl version

Update your system to ensure all dependencies are up-to-date:

sudo apt update && sudo apt upgrade -y

That should do it for you. If it doesn’t update it means that’s the newest one for your Distro:

https://launchpad.net/ubuntu/jammy/+source/openssl

The above states that the latest official openssl version that is supported is 3.0.2.

Heya, @mdhabiburrahmantalukdershamim

  1. Visit the OpenSSL downloads page to get the latest stable version (3.4.0 at this time).
  2. Download the tarball:
wget https://www.openssl.org/source/openssl-3.4.0.tar.gz
  1. Extract the tarball:
tar -xvzf openssl-3.4.0.tar.gz 
cd openssl-3.4.0
  1. Configure and build OpenSSL:
make 
sudo make install
  1. Verify the installation path: The new OpenSSL binary should be installed in /usr/local/bin. To ensure the new version is used, update the symbolic link:
sudo ln -sf /usr/local/bin/openssl /usr/bin/openssl
  1. Update the library paths: Add /usr/local/lib to your library path:
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/openssl-3.4.0.conf 
sudo ldconfig

Check the OpenSSL version again:

openssl version

It should now show OpenSSL 3.4.0

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.