0

I have compiled the latest version of OpenSSL 1.1.1k on Debian Buster.

./config
make
sudo make install

However when I check the version, I realise only the tool has been updated and not the underlying library. What am I missing please?

> openssl version
OpenSSL 1.1.1k  25 Mar 2021 (Library: OpenSSL 1.1.1d  10 Sep 2019)
Houman
  • 1,545
  • 4
  • 22
  • 36
  • You probably have a system installed version of openssl. Without full path the shell will follow the folders of the PATH environment variable. The compiled version should be installed elsewhere. Probably in /usr/local/bin. Try to run the command with full path: /usr/local/bin/openssl version. – João Alves May 21 '21 at 08:58
  • Thanks, do you know where the path for openssl is set? I checked `~/.bashrc`and can't see it. (see my answer below thanks) – Houman May 21 '21 at 09:04

1 Answers1

0

I found the reason. Prior to compilation I had libssl-dev installed, which collided with this. Despite sudo apt remove libssl-dev I couldn't get rid of it. Maybe a purge would have helped. I didn't try it.

I had to reinstall Debian but this time I didn't install libssl-dev.

sudo -E apt install software-properties-common build-essential make wget
wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
tar -zxvf openssl-1.1.1k.tar.gz
cd openssl-1.1.1k/
./config
make
sudo make install
openssl version
OpenSSL 1.1.1d  10 Sep 2019

sudo ldconfig
openssl version
OpenSSL 1.1.1d  10 Sep 2019 (Library: OpenSSL 1.1.1k  25 Mar 2021)

Then after reboot.

openssl version
OpenSSL 1.1.1k  25 Mar 2021

And I found a way to avoid reboot.

echo 'export PATH="/usr/local/ssl/bin:${PATH}"' >> ~/.bashrc
source ~/.bashrc
Houman
  • 1,545
  • 4
  • 22
  • 36
  • You need to update the library cache with `ldconfig` when you move shared libraries around, then you can avoid the reboot. – Simon Richter May 21 '21 at 10:30
  • Thanks, that helped to update the library. But not the path to executable. But I found a way. – Houman May 21 '21 at 11:15
  • Executable locations are cached by each shell instance, the `hash` builtin command can be used to change this cache. – Simon Richter May 21 '21 at 11:31