When I run 'openssl' I am getting an error as below :
It turns out (as I suspected) that you tried to run a 32-bit executable on a 64-bit system. 64-bit Linux kernel is capable of running 32-bit executables (that's why you don't get 'exec format error'), but it needs a separate set of (32-bit) libraries: 64-bit version of libudev.so.0 is useless for a 32-bit program.
openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory'
This happened after I attempted to update OpenSSL according to this article
Is there anyway to fix this?
OS : CentOS 6.8Web server : nginx/1.10.2
Update #1 :
mayasl
mayaslmayasl
9 Answers
I was having the same issue after install the last version of openssl 1.1.0c, I resolved the issue copying the library files
After copy the libraries you need to create the symbolic link.
libcrypto.so.1.1
, libcrypto.a
and libssl.so
from /usr/local/lib64
to the share library at /usr/lib64
.After copy the libraries you need to create the symbolic link.
After creating the symbolic link rebuilding the ldconfig cache was required as well:
Castaglia2,65433 gold badges1212 silver badges3636 bronze badges
BenedictBenedict
With your original version of OpenSSL it knew how to find the shared libs because
/usr/lib64
is included in the linker's search path. When you downloaded and compiled a 'local' copy of OpenSSL, the shared libs were placed in /usr/local/lib64
by default. So you probably just need to add this directory to the search path of the linker, like this (as root):then execute:
I believe this will resolve your issue.
chicks3,09077 gold badges2020 silver badges3333 bronze badges
doug.fsudoug.fsu
I got this error using Termux on ChromeOS, which caused the
npm
and node
command line programs to crash.Running
pkg upgrade
fixed the problem!Carl WalshCarl Walsh
You can reinstall it using
yum install -y openssl-devel
3,47511 gold badge1515 silver badges2929 bronze badges
What @benedict said worked for me. However you may find that some of the symlinks are pointing to older versions. Running
ls -l libcrypto*
from the /usr/libs will show you the links. As in the below example:Then you would want to remove the existing link first by typing
sudo rm libcrypto.so
and then copying libcrypto.so.1.1 as @benedict mentioned. Finally you can create the new link.sudo ln -s libcrypto.so.1.1 libcrypto.so
Hope this helps.
Ihsan IzwerIhsan Izwer
The
libcrypto.so
belongs to openssl-libs
package. If you manually force removed (with --nodeps
) this package or corrupted it by upgrading it, you will lose access to yum, wget, curl, ssh, etc. If the system has Internet access, download the openssl-libs
using the command /usr/bin/GET
. The syntax would look like the below if you're trying to restore version openssl-libs-1.0.2k-8.el7.x86_64
:This will create
chicksopenssl-libs-1.0.2k-8.el7.x86_64.rpm
package for you, you can use this to either re-install or extract the missing .so
file.3,09077 gold badges2020 silver badges3333 bronze badges
KarthikKarthik
I am gone through the exactly same issue... I have solved it by running the following commands.
ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
This will create a softlink and you are good to go.
FaheemFaheem
This is best solution I have found around ...other solutions provided all over the internet, will not survive system reboot ;)
OS: Ubuntu 16.04
Comment lib directory settings and add good path
When you are done editing, run this command:
Then you will have good setting when you run:
ldd /usr/bin/openssl
Before this fix:
After fix I provided:
ZEROFZEROF
After building and installing open ssl openssl-1.1.0f, I fixed same error for lib libssl.so.1.1 creating a soft link :
ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1
RafaelRafael
Not the answer you're looking for? Browse other questions tagged openssl or ask your own question.
I am trying to run an exe which uses
libudev.so
but it gives this error :error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
Running
uname -a
gives : 3.5.0-44-generic #67~precise1-Ubuntu SMP Wed Nov 13 16:16:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I am using Ubuntu 12.04
I have checked
/lib
/lib32
/lib64
there is no libudev in there but in Synaptic manager I can see libudev0
installed (see image below) and I could find it in
/lib/x86_64-linux-gnu/libudev.so.0
.What could be wrong?
Potherca7,90933 gold badges4848 silver badges6868 bronze badges
RaulpRaulp3,33388 gold badges5454 silver badges106106 bronze badges
4 Answers
It turns out (as I suspected) that you tried to run a 32-bit executable on a 64-bit system. 64-bit Linux kernel is capable of running 32-bit executables (that's why you don't get 'exec format error'), but it needs a separate set of (32-bit) libraries: 64-bit version of
libudev.so.0
is useless for a 32-bit program. (See ld.so manpage for some details on shared library dependency resolution). Modern Debian-based distributions support simultaneous library installation for several architectures.
apt-get install libudev0:i386
should get a 32-bit version of the library and all its dependencies (there might be plenty of them if it's the first time you use a 32-bit application). If you upgraded from an ancient installation, you might need to add i386
to architectures supported by dpkg
, like this:Some advices to use if the program needs some other libraries as well:
- Use ldd to see all the dependencies at once (and what's missing)
- Install apt-file and run
apt-file update
, so you can look up a package name by a file name, even if the package is not currently installed (like this:apt-file search /libudev.so.0
)
There was also an old Debian way of getting 32-bit libraries on a 64-bit system:
ia32-libs
package in amd64 repositories provided a set of libraries, conceptually 'everything your application might need'. Don't use this approach unless you're running Debian squeeze or earlier (or a debian-based distro of the same age). Even when it worked, there was no guarantee that the program doesn't need some other library as well. Ia32-libs
was useful when multiarch support was not ready yet, and that was some years ago.Anton KovalenkoAnton Kovalenko
I just followed this instructions and it works just fine.
Community♦
Isaac LealIsaac Leal
Ravi Dhoriya ツ4,19588 gold badges2828 silver badges4444 bronze badges
Weston GangerWeston Ganger3,08111 gold badge2727 silver badges2929 bronze badges
I encountered this error while messing around with Orange Pi RK3399 trying to flash firmware from Linux Mint. The solution was in manual for this Pi and given the following command:
Not sure but
libudev-dev
should be enough so the command would be:Not all those given packages are needed.
pbiespbies