I need to install openssl 1.0 on debian 9 (stretch). when I run apt-get install openssl , version 1.1 is installed by default.
how can I change the repository in order to install an old version of openssl?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityAs others have mentioned, if you can use OpenSSL 1.1 instead, that would be best.
However, if you really do need OpenSSL 1.0, the answer depends on your exact requirement. If you only need the OpenSSL library, and if version 1.0.2 is appropriate, then you can install libssl1.0.2
from Debian 9 and be done with it.
If you need version 1.0 of the openssl
tool, or version 1.0.1 of the library, the simplest option on Debian 9 is to install it from Debian 8 (which still receives security updates, and will until 2020). To do so, create a file called /etc/apt/sources.list.d/jessie.list
containing the following:
deb http://httpredir.debian.org/debian jessie main contrib non-free
deb-src http://httpredir.debian.org/debian jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
Then run sudo apt update
, and apt install openssl/jessie
for the openssl
tool, or apt install libssl1.0.0
for the library.
Contrary to some people’s claims, you don’t risk breaking your system by installing these packages, thanks to package management and properly-defined package dependencies.
libssl1.1 (>= 1.1.0)
...
Jan 25, 2018 at 22:42
libssl1.0.0
is co-installable with libssl1.1
. I have this exact setup on a couple of systems, one in particular which is used to track the 1.0-to-1.1 transition, and it works fine.
Jan 26, 2018 at 5:19
libssl1.0.0
in your repository seems to be a port of openssl 1.0.1t
in fact . No trace of a 1.0.2 version. Based on packages.debian.org/… there seem to be a backport of some 1.0.2
version in jessie-backports
repository.
Apr 12, 2018 at 0:03
I do not know if you will find older versions of a software, such as openssl
, for newer version of your distribution, as most of the time it will not make sense, as newer versions should fix problems, etc. (they are exceptions of course). Alternatively, why not use Debian 8 directly?
But have a look at https://serverfault.com/questions/108080/ubuntu-debian-show-list-of-available-versions-of-a-specific-package and the apt-show-versions
and rmadison
tools.
So first you have to really make sure you absolutely need an old version. You do not detail your use case, so hard to give good advises.
What you can always do is install from the sources themselves... but it is not a simple task. The compilation by itself may not be a huge deal, but you need to install it separately from the system part, like in /usr/local
and for something typically used as a library by other applications, you need to recompile the other applications to make sure to use your local version instead of the system one. You will have a similar problem if you happen to find an old package that suits your needs: other applications on the system relying on openssl
might not work anymore and the software list on your system may be broken.
In short make really absolutely sure without alternatives that you need to do that!
And if you never compiled anything on a Linux system (it will be mostly the same in all distributions), openssl
is maybe not the best candidate for first try.
Go to https://www.openssl.org/source/ and download the version you need (I do hope that you find it here, because otherwise you will have an even bigger problem).
As with other software, start with README
that basically tells you to read INSTALL
.
And it boils down to:
$ ./config
$ make
$ make test
$ make install
But please make sure to read the file before doing anything as it has important information, like where the software will be installed.
Then you need to be able to use the result in whatever application you need it... but you do not give context of your question, so I can not help you.
Often you will need to recompile other software with a flag such as --with-openssl=DIRECTORY
to force it to use your version instead of the normal system one.
openssl
changes a lot between versions...if some old software needs it, a new version is not a drop in replacement.
Jan 25, 2018 at 22:07
sources.list
entries can see -apt-cache madison openssl
. If you want a non-default version, useapt-get install packagename=specificversion
- ie,apt-get install openssl=1.0.2g-1ubuntu4
(on my Mint 18 system)