3

This question already has an answer here:

I installed OpenSSL from source by:

wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
tar -xvzf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h/
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
sudo make
sudo make install

But when I type openssl on the command line, it says 'The program 'openssl' is currently not installed'. What should I do?

marked as duplicate by sam, jimmij, mdpc, Networker, eyoung100 Jul 3 '16 at 3:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    I disagree with the proposed duplicate. This isn't about where things should be installed, or even how to install some piece of software (OpenSSL in this particular case). Rather, this is clearly about where the software actually ended up and why it can't be executed by giving just the name of the binary on the command line. – a CVn Jul 1 '16 at 20:27
  • Alex, please note that your commands were to download one version (OpenSSL 1.0.2h, which is current at this time), but unpack, build and install another (1.0.0a, which is outdated, "out of support and should not be used", besides probably having some security-related bugs that have been fixed since 2013). – a CVn Jul 1 '16 at 20:33
  • My bad, I fixed it, – Alex Jul 2 '16 at 8:54
  • 1
    Also see Compilation and Installation on the OpenSSL wiki. It discusses other options, like enable-ec_nistp_64_gcc_128. It also discusses how to add an RPATH. You might be surprised to learn what ldd /usr/local/openssl/bin/openssl returns. It may be using libssl and libcrypto from /usr/lib. – user56041 Nov 9 '16 at 12:17
7

With your prefix you will need to run something like /usr/local/openssl/bin/openssl.

If you don't want to type the full pathname then you can add the /usr/local/openssl/bin directory to your PATH, or you can symlink the openssl command into /usr/local/bin (assuming that's on your PATH). e.g.

sudo ln -s /usr/local/openssl/bin/openssl /usr/local/bin
  • 4
    Note that either of these, without additional steps, means the OP won't be able to immediately read the man pages (which are likely in /usr/local/openssl/share/man) etc. – a CVn Jul 1 '16 at 20:35
  • @toszter - you should open this as a new question, not as a comment – Stephen Harris Jan 6 '18 at 19:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.