How to stop using Anaconda's Version of OpenSSL
Solution 1
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
, sochmod -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.
Solution 2
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
Solution 3
Conda may be active by default in your shell, often the case for an anaconda installation on Ubuntu. There may be (base)
at the beginning of your shell prompt.
Simply running conda deactivate
may fix the issue. It did for me.
Comments
-
Foobar over 1 year
I ran the following command:
sudo apt-get install --only-upgrade openssl
and the output was:
openssl is already the newest version (1.1.0g-2ubuntu4.1).
However, when I type
openssl version -a
into the terminal, the output is:OpenSSL 1.0.2o 27 Mar 2018 built on: reproducible build, date unspecified platform: linux-x86_64 options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: /tmp/build/80754af9/openssl_1522162531585/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/home/vedantroy/anaconda3/include -fdebug-prefix-map=/tmp/build/80754af9/openssl_1522162531585/work=/usr/local/src/conda/openssl-1.0.2o -fdebug-prefix-map=/home/vedantroy/anaconda3=/usr/local/src/conda-prefix -Wa,--noexecstack -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM OPENSSLDIR: "/home/vedantroy/anaconda3/ssl"
Furthermore, typing
which openssl
outputs:/home/vedantroy/anaconda3/bin/openssl
.It seems my system is using the conda installation of "openssl" instead of the one installed by
apt-get
. How do I force my system to use the version of "openssl" that is installed byapt-get
? -
George Udosen over 5 yearsplease explain the characters before the openssl!
-
Ravexina over 5 years@GeorgeUdosen Causes aliases to be ignored and the actual comment be invoked or bash built-in if any exists (Which in this case there is no built-in so the actual command will get to run).
-
David over 2 yearsYour answer is unclear as to did the link fix it.