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?

  • 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.
    – user
    Commented Jul 1, 2016 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).
    – user
    Commented Jul 1, 2016 at 20:33
  • My bad, I fixed it,
    – Alex
    Commented Jul 2, 2016 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
    Commented Nov 9, 2016 at 12:17

1 Answer 1


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.
    – user
    Commented Jul 1, 2016 at 20:35
  • @toszter - you should open this as a new question, not as a comment Commented Jan 6, 2018 at 19:32

Not the answer you're looking for? Browse other questions tagged .