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