I am using centos 6.4. While doing dig or nslookup, I got below error
dig google.com
dig: error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory
here is my ldd of dig
'# ldd /usr/bin/dig
linux-vdso.so.1 => (0x00007fff5e674000)
liblwres.so.80 => /usr/lib64/liblwres.so.80 (0x00007f73d5c1c000)
libdns.so.81 => /usr/lib64/libdns.so.81 (0x00007f73d5883000)
libbind9.so.80 => /usr/lib64/libbind9.so.80 (0x00007f73d5676000)
libisccfg.so.82 => /usr/lib64/libisccfg.so.82 (0x00007f73d5454000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f73d5210000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f73d4e75000)
libisccc.so.80 => /usr/lib64/libisccc.so.80 (0x00007f73d4c6d000) '
....
Do you know how can I fix this error?
Please help,
Thanks,
SP
try a soft link
ln -s /usr/lib64/libcrypto.so.10 /lib
Let us know if that helped you.
Or you can remove and install again using yum. Normally library files places to its apt position when installs using yum.
yum remove dns-utils
yum install dns-utils
You can enable epel repositories in case you need it epel
When you are trying
ldd /usr/bin/dig
Are you able to find a line like
libcrypto.so.4 => not found
If so Try
locate libcrypto.so.4
Suppose you can locate the file at /path/to/file/libcrypto.so.4
then try the command
export LD_LIBRARY_PATH="/path/to/file"
Then try command dig. It should be fine. Other wise you need to search for the package that provides the libcrypto.so.4 library
Related
I installed rocket chat using snap, following the documentation here.
Now I am trying to enable SSL following the documentation: Auto SSL with Snaps. However, the following error shows up:
$ sudo snap set rocketchat-server https=enable
error: cannot perform the following tasks:
- Run configure hook of "rocketchat-server" snap (run hook "configure":
-----
dig: error while loading shared libraries: libdns.so.162: cannot open shared object file: No such file or directory
Error: Can't resove DNS query for <my_domain_name>, check your DNS configuration, disabling https ...
-----)
Checking what ldd has to say for dig, I found few other libs are also not found:
$ ldd /snap/rocketchat-server/current/usr/bin/dig
linux-vdso.so.1 (0x0000ffff98afc000)
libdns.so.162 => not found
liblwres.so.141 => not found
libbind9.so.140 => not found
libisccfg.so.140 => not found
libisc.so.160 => not found
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff98a71000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff98900000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff98acc000)
So, checked if libdns.so exists at all.
$ locate libdns.so
/snap/rocketchat-server/1437/usr/lib/aarch64-linux-gnu/libdns.so.162
/snap/rocketchat-server/1437/usr/lib/aarch64-linux-gnu/libdns.so.162.1.3
/usr/lib/aarch64-linux-gnu/libdns.so.1601
/usr/lib/aarch64-linux-gnu/libdns.so.1601.0.0
It appears that the concerned library exists under snap.
Is there a way to resolve this and make caddy/https work?
System:
Raspberry Pi 4 (aarch64)
Linux ubuntu 5.4.0-1022-raspi
Ubuntu Server 20.04.1 LTS
Similar issues:
dig: error while loading shared libraries: libdns.so.162: cannot open shared object file: No such file or directory
shared libraries of dig and nslookup
Try to do a soft-link to library in your file system
ln -s /snap/rocketchat-server/1437/usr/lib/aarch64-linux-gnu/libdns.so.162 /lib
Or install dns-utils which should add missing lib to your system.
When trying to download a Windows XP Virtual Machine from https://www.modern.ie/en-us/virtualization-tools#downloads the file I downloaded has an .sfx extension. The file is IE6.WinXP.For.LinuxVirtualBox.sfx. After downloading the file using wget (and by clicking the link through Icedove), I have the file located in my /root directory. Followed the instructions to make it executable then run the file as follows...
root#kali:~# chmod +x IE6.WinXP.For.LinuxVirtualBox.sfx
root#kali:~# ./IE6.WinXP.For.LinuxVirtualBox.sfx
./IE6.WinXP.For.LinuxVirtualBox.sfx: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I have tried editing the ld.so.conf file to add /usr/local/lib, I have tried adding /usr/local/lib to LD_LIBRARY_PATH, but still get the same error. I have also tried installing libstcdc++.so.6 with apt-get but unable to locate the package. The following results might help...
root#kali:~# ldd /root/IE6.WinXP.For.LinuxVirtualBox.sfx
linux-gate.so.1 => (0xf7759000)
libstdc++.so.6 => not found
libm.so.6 => /lib32/libm.so.6 (0xf7717000)
libgcc_s.so.1 => not found
libc.so.6 => /lib32/libc.so.6 (0xf75b1000)
/lib/ld-linux.so.2 (0xf775a000)
This is above my head, please could somebody help me get this VM installed. My system info:
Linux kali 3.14-kali1-amd64 #1 SMP Debian 3.14.5-1kali1 (2014-06-07) x86_64 GNU/Linux
Sometimes symbolic links are broken when you do a system update. Try to search for the version of libstdc++ in your computer with the find command(dont forget to run with sudo) and create a symbolic link with that name(libstdc++.so.6) pointing to your existing library.
I compile my project on the Gentoo linux(x86_64) with 2.15 glibc.
Then i copy the *.so and out to centos server (6.2 x86_64) with glibc 2.12.
when i run command:
LD_LIBRARY_PATH=/home/ray/deploy/lib:/opt/glibc-2.15/lib:$LD_LIBRARY_PATH ./deploy/proxy/scan
i got error :
./deploy/proxy/scan: error while loading shared libraries: libchecksum.so: cannot open shared object file: No such file or directory
what confusing me is that when i run command :
sudo LD_LIBRARY_PATH=/home/ray/deploy/lib:/opt/glibc-2.15/lib:$LD_LIBRARY_PATH ./deploy/proxy/scan
it works.
Does anybody know what goes wrong?
ldd info:
linux-vdso.so.1 => (0x00007fff207c1000)
libchecksum.so => /home/ray/deploy/lib/libchecksum.so (0x00007fcccced2000)
libportscan.so => /home/ray/deploy/lib/libportscan.so (0x00007fccccccc000)
libc.so.6 => /opt/glibc-2.15/lib/libc.so.6 (0x00007fcccc926000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcccd0d5000)
it shows that the *.so are found.
Thanks for your comments.
I try to compile on the server machine but the problem still exists.
I try to give 0777 to the libs and run scripts but still not work.
The setcap or sudo disable the LD_LIBRARY_PATH variable. So, it do not work.
You may use rpath option in gcc or just link the shared lib to /usr/lib.
I am trying to install the Haskell Platform on Linux for the first time (I'm also a fairly new Linux user). The victim system is a fresh Red Hat system. And everything involved here should be 64 bit.
The directions at the platform website [1] indicate that I need a ghc7.0.3 to boostrap things. They provide a link to a generic binary of ghc-7.0.3 to do this. I fetched this and ran
$ ./configure ...
$ make install ...
as per the directions without incident (it is a binary, so no compilation needed)
However, when I tried to run ghci I get the output.
$ ghci
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... <command line>: can't load .so/.DLL for: gmp (libgmp.so: cannot open shared object file: No such file or directory)
For some reason ghci cannot find libgmp.so. Running ghci ultimately invokes
/usr/local/lib/ghc-7.0.3/ghc
with a mess of options. I checked the dependencies via ldd
$ ldd /usr/local/lib/ghc-7.0.3/ghc
linux-vdso.so.1 => (0x00007fffe5f5c000)
libncursesw.so.5 => /lib64/libncursesw.so.5 (0x0000003ee7000000)
librt.so.1 => /lib64/librt.so.1 (0x0000003ee5800000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003ef3000000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003ee5000000)
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x0000003ee4400000)
libm.so.6 => /lib64/libm.so.6 (0x0000003ee4c00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003ee5400000)
libc.so.6 => /lib64/libc.so.6 (0x0000003ee4800000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x0000003ef3400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003ee4000000)
and it shows that it foud libgmp. libgmp is in /usr/local/lib and /usr/local/lib64.
I am not sure how to get further with this. Any suggestions?
[1] http://hackage.haskell.org/platform/linux.html
You either add /usr/local/lib and/or /usr/local/lib64 to $LD_LIBRARY_PATH, or add them to /etc/ld.so.conf, or (since you already have /usr/lib64/libgmp.so.3) add a missing symbolic link:
cd /usr/lib64
sudo ln -s libgmp.so.3 libgmp.so
(and perhaps the same for /usr/lib).
Note that /usr/lib64/libgmp.so.3 might be a different version from /usr/local/lib64/libgmp.so, make sure ghc can actually be used with the former.
Installing gmp-devel package helped in my case (opensuse)
I'm not sure that setting a symbolic link from libgmp.so to libgmp.so.3 is the right way to go. What happens when you get a version update and so libgmp.so.3 disappears. Setting LD_LIBRARY_PATH seems like a better solution.
There's also another solution for RedHat/CentOS and by extension probably Fedora: install the gmp-devel package. This sets up the symbolic link above, but does so with in the distribution (so updates should update the symbolic link also).
I'm running eclipse on Ubuntu using a g++ compiler and I'm trying to run a sample program that utilizes xerces.
The build produced no errors however, when i attempted to run the program, I would receive this error:
error while loading shared libraries: libxerces-c-3.1.so: cannot open shared object file: No such file or directory
libxerces-c-3.1.so is in the directory /opt/lib which I have included as a library in eclipse. The file is there when I checked the folder. When I perform an echo $LD_LIBRARY_PATH, /opt/lib is also listed.
Any ideas into where the problem lies? Thanks.
An ldd libxerces-c-3.1.so command yields the following output:
linux-vdso.so.1 => (0x00007fffeafff000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00007fa3d2b83000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa3d2966000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa3d265f000)
libm.so.6 => /lib/libm.so.6 (0x00007fa3d23dc000)
libc.so.6 => /lib/libc.so.6 (0x00007fa3d2059000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fa3d1e42000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa3d337d000)
Try running ldconfig as root to see if it solves the problem.
Run ldd libxerces-c-3.1.so and examine the output to see if all dependencies can be found.
There are many ways to do this, most already mentioned here. BUT you want to avoid accidentally copying your library files into/over those of the system. This is easily done since people have little imagination in making original unique names for their libraries.
So there are a couple of things to think about:
Do you need these files to be a permanent part of your system?
Do you only need to install for testing and frequent updates?
Do you only need them for running that particular command once or twice?
Where are your native libraries located?
To find your various library locations on your system (apart from using find), look here:
cat /etc/ld.so.conf
cat /etc/ld.so.conf.d/*
On Linux there are some standard places:
/lib # for base system (don't use this!)
/usr/lib # for package manger installed apps
/usr/local/lib # for user installed apps
There are many others, but you should most likely stay with /usr/local/lib.
Next you need to tell your system where to find these libraries. The cool system dude (who knows what he is doing) way to do this is using ldconfig, however, you may do stuff you regret, if you make a mistake here. The safest way to use that command is by using the flags -v -n to make the command verbose and to specify what library directory you need to add.
sudo ldconfig -v -n /usr/local/lib/your-uber-libs
Done. But if you only wanna test something, then rather use your LD_LIBRARY_PATH directly from command line, like this:
LD_LIBRARY_PATH=/usr/local/lib/your-uber-libs ./your_uber_command
Alternatively, add the following to your .bashrc script.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/your-uber-libs
Now you can run your dynamically linked command.
I copied all the library files from /opt/lib into /usr/lib and the program works now. Thanks for the response.
Try installing the library libxerces-c3.1 as. Use the command mentioned below to install the library.
sudo apt-get install libxerces-c3.1
This worked like a charm for me.