Resolve software startup report error while loading shared Libraries:libgd.so.2:cannot open Shared object errors
This error was reported when installing the Nginx Installer today: Error while loading shared Libraries:libgd.so.2:cannot open shared object, online search of relevant information, resolved, in this record, Also let the later encounter this problem friend can quickly solve.
First of all, the solution, to help worry about the problem of friends, this is due to the lack of GD library, put him on it. Installation method: 1, direct yum install GD the simplest 2, if Yum search not to the GD library installation package, you can manually download the corresponding RPM package,: http://rpmfind.net/linux/rpm2html/search.php?query= Libgd.so.2 installed after download.
After the installation is complete, start nginx normal again.
Again, the troubleshooting steps, follow-up encounter similar problems can be referred to this method to solve.
According to the error message, the Libgd.so.2 class library file failed to load. Either the LIB is not installed or the installation location is not in the correct position. Check the Nginx-dependent class library file using the LDD command:
- Ldd/usr/local/nginx/sbin/nginx
- Linux-vdso.so.1 = (0x00007fffd5fb6000)
- libpthread.so.0 =/lib64/libpthread.so.0 (0x000000379e200000)
- Libcrypt.so.1 =/lib64/libcrypt.so.1 (0x000000393f200000)
- libpcre.so.0 =/lib64/libpcre.so.0 (0x00000033d5800000)
- libssl.so.10 =/usr/lib64/libssl.so.10 (0x0000003c60200000)
- libcrypto.so.10 =/usr/lib64/libcrypto.so.10 (0x0000003df9800000)
- libdl.so.2 =/lib64/libdl.so.2 (0x000000390be00000)
- Libz.so.1 =/lib64/libz.so.1 (0x0000003a25600000)
- libc.so.6 =/lib64/libc.so.6 (0x0000003a24200000)
- Libgd.so.2 = not Found
- /lib64/ld-linux-x86-64.so.2 (0x0000003a23e00000)
- libfreebl3.so =/lib64/libfreebl3.so (0x000000393ea00000)
- libgssapi_krb5.so.2 =/lib64/libgssapi_krb5.so.2 (0x000000379fa00000)
- Libkrb5.so.3 =/lib64/libkrb5.so.3 (0x000000379d200000)
- libcom_err.so.2 =/lib64/libcom_err.so.2 (0x000000379e600000)
- Libk5crypto.so.3 =/lib64/libk5crypto.so.3 (0x0000003df9c00000)
- libkrb5support.so.0 =/lib64/libkrb5support.so.0 (0x0000003dfa800000)
- Libkeyutils.so.1 =/lib64/libkeyutils.so.1 (0x0000003dfa400000)
- libresolv.so.2 =/lib64/libresolv.so.2 (0x0000003a26a00000)
- Libselinux.so.1 =/lib64/libselinux.so.1 (0x0000003df7c00000)
Find this can't be found, libgd.so.2 = not found
Online A search, this library is GD installation package, if confirmed installed GD, then this library is on the system, through the Find command to locate this file
find / -name ‘libgd.so.2‘
Once found, can be copied to the corresponding Lib directory, if not, it can only reinstall, how do we know the name of the package to install it? Very simple, you can search this libgd.so.2 Baidu, you can find out which installation package This library file is from. Or you can go to this website to check, http://rpmfind.net/linux/rpm2html/search.php?query=libgd.so.2, find this class library from GD installation package
First
yum search gd
Search, if there is, then directlyyum install gd
On it, no words can also through the above site, find the installation package (mainly depends on the operating system version number, there is something 32 or 64 bit, the new version is 64), download down, and then through the corresponding command installation can be. Other class library file missing workarounds are similar.
Article Starter: https://www.geek-share.com/detail/2750257208.html
Reference article:
How to install and start Nginx in Linux
What can nginx do? After reading this, you'll understand.
Nginx+php+mysql dual-machine interoperability, fully automatic switching scheme
Resolve software startup report error while loading shared Libraries:libgd.so.2:cannot open Shared object errors