23

When I use 'apt-get install openssl', my Ubuntu 16.04 install OpenSSL 1.0.2g version. I expect to install 1.1.0 versions.

Why is not install 1.1.0 version? How can i install the last version?

Thanks.

jww
  • 97,681
  • 90
  • 411
  • 885
malievci
  • 369
  • 1
  • 2
  • 6
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Ask Ubuntu](http://askubuntu.com/) would be a better place to ask. – jww Jan 27 '17 at 10:21
  • *"How can i install the last version?"* - See [Compilation and Installation](https://wiki.openssl.org/index.php/Compilation_and_Installation) on the OpenSSL wiki. You may be able to find a [Ubuntu PPA](https://launchpad.net/ubuntu/+ppas), too. – jww Jan 27 '17 at 10:29
  • 12
    It is related to programming and development ecosystem, so it's not off-topic. – egidiocs Nov 06 '17 at 22:05

2 Answers2

49

You should choose the version you want to install on the OpenSSL's site. It seems you want to install the 1.1.0. So, do as it follows.

wget https://www.openssl.org/source/openssl-1.1.0f.tar.gz
tar xzvf openssl-1.1.0f.tar.gz
cd openssl-1.1.0f
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
make
sudo make install

openssl version -a

It is done. It is as simple as that. Good luck with it.

edson.a.soares
  • 1,010
  • 12
  • 12
  • Do I have to remove previous version? – egidiocs Nov 07 '17 at 15:21
  • 1
    It depends on your purpose and environment. If you are just installing an OpenSSL different version on your PC, just install the new version. If it is something more than that, tell me more about what exactly you are doing. – edson.a.soares Nov 07 '17 at 20:47
  • @edson.a.soares can u please help me with my issue https://stackoverflow.com/questions/48776525/unable-to-install-openssl-1-1-on-ubuntu-8? – OTUser Feb 13 '18 at 22:14
  • 2
    There's no need to use `sudo` for the `make` command. You might need it for `make install` if you're installing in a location that requires root permissions. – Keith Thompson Feb 14 '18 at 00:32
  • 1
    Hi, @RanPaul. I see Keith has answered your question. I think there nothing more to say about it. About the `sudo` issue when you are running make, that is correct, most of the time. Thank you, Keith. I will correct the answer. A practical example of it would be [that way](https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu) to install **Google Test framework**. Once you're in a location that requires root permissions, you'll need `sudo`. – edson.a.soares Feb 22 '18 at 20:29
  • Hi @edson.a.soares can you help me with my issue [link](https://stackoverflow.com/questions/51560964/how-to-upgrade-openssl-from-1-0-2g-to-1-1-0g-in-ubuntu-and-let-python-recognize). I followed the instruction here. The old OpenSSL is still the one that appears when I check the version via: `openssl version -a`. I do not get `openssl 1.1.0g`. I need to use `openssl 1.1.0g` with python 3.6.5. Please help. – user9371654 Jul 27 '18 at 15:47
  • `/usr/local/bin/openssl version` printed the right version. – Aa'Koshh Oct 10 '18 at 09:31
  • 4
    Holy cow this is reckless advice. Don't just download the raw upstream version of packaged software used all over your system and `make install` it. Things. Will. Break. In this case, you'll end up with two versions of openssl - the distro one managed by apt under /usr and a second one installed in /usr/local. When updating to the newer Ubuntu, apt will update its version, and this manual one will be left. Locally-built programs might be linked against one or the other, depending on environment variables. It'll make a mess long-term, and possibly short-term. – dannysauer Jan 03 '19 at 20:27
  • 1
    Nope! It's not reckless advice. It's a simple way to install Open SSL meant for simple cases. Of course, it won't fit all scenarios. No solution does. There is a lot of possibilities taking into account the scenario. That's why I asked for more information if it was for more than installing OpenSSL on a Personal Computer. – edson.a.soares Jul 23 '19 at 19:32
1

If you are using Ubuntu 18+, version 1.1.0 is now be available via apt.

You can also use apt list openssl to see what can be updated. And even throw in the -a modifier to show all versions available.

Tyler Christian
  • 520
  • 7
  • 14
  • 1
    Nope. The 1.1.x aren't available via apt (today: October 2019). Have: Ubuntu 16.04.6 LTS. Successfully run "apt update". Now output of "apt list openssl -a" shows only 1.0.2. Quote: Listing... Done openssl/xenial-updates,xenial-security,now 1.0.2g-1ubuntu4.15 amd64 [installed] openssl/xenial 1.0.2g-1ubuntu4 amd64 – Dmitry Shevkoplyas Oct 01 '19 at 17:27
  • Yes. Sorry, it looks like 1.1.1 is only available in Ubuntu 18.0+ LTS. I'll add that to my answer. Thank you! – Tyler Christian Oct 01 '19 at 20:31