How to stop using Anaconda's Version of OpenSSL

The openssl package installs an executable file called openssl as /usr/bin/openssl (see dpkg -L openssl).

You have openssl installed as /home/vedantroy/anaconda3/bin/openssl.

The directory /home/vedantroy/anaconda3/bin occurs in $PATH before /usr/bin appears.

Your $SHELL picks the first openssl it sees.

You have several choices:

  • Rearrange $PATH. However, if there are any other system binaries Anaconda wants to override, this will screw that up.
  • I assume that you own the directory /home/vedantroy/anaconda3/bin, so chmod -x /home/vedantroy/anaconda3/bin/openssl;rehash will let you use /usr/bin/openssl.
  • Add alias openssl="/usr/bin/openssl" to your ~/.bashrc. WIll only work for shells.

In your case I suggest creating an alias to apt installed version of openssl:

alias openssl='/usr/bin/openssl'

Put your alias somewhere which it gets sourced automatically like: .bashrc.

You can also run it directly:

/usr/bin/openssl

Or change the PATH environment variable, which can't be a good option in your case because you are actually using Anaconda.

Whenever you want to use Anaconda version then run one of these:

\openssl
""openssl
''openssl
'openssl'
"openssl"
command openssl