Error in library file missing

Source: Internet
Author: User

Reference command: ldd $ (which/usr/local/nginx/sbin/nginx)

LDD $ (which /usr/lib/jvm/jre-1.7.0/bin/java)

Error message:

Nginx error message:  

Service Nginx Restart
/usr/local/ngInx/sbin/ngInx:error while loading shared libraries:libgd.so.2: Cannot open shared object File:no such file or directory
nginx Stop failed/usr/local/ngInx/sbin/ngInx:error while loading shared libraries:libgd.so.2: Cannot open shared object File:no such file or directory

Tomcat error message:

/tomcat/bin/catalina.sh:line 394:/usr/lib/jvm/jre-1.7.0/bin/java:no such file or directory

Library file missing reason, self-summary for three kinds of reasons

1. Incomplete or missing installation package for compilation and installation

2. mistakenly delete some rpm packages on the operating system

3. System Unknown error cause the library file is missing or the soft link is invalid

Determine why the library file is missing caused by the error?

There are hints in the error message lib keyword should immediately think of a possible reason for the library file

Nginx Debugging Process

Display with command on the wrong host: LDD $ (which/usr/local/nginx/sbin/nginx)


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/D5/wKioL1U4VX-w9J4MAARSfb7xO8g497.jpg "title=" 1.png " alt= "Wkiol1u4vx-w9j4maarsfb7xo8g497.jpg"/>

Missing libgd.so.2 library file,Find/-name libgd.so.2 did not find this library file

-------------------------------------------------------------------------------------------

Find another nginx. View the soft link condition of the library file ldd $ (which/usr/local/nginx/sbin/nginx)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6B/DB/wKiom1U4cOOi9UEfAAZnvea-CA0662.jpg "title=" normal. png "alt=" Wkiom1u4cooi9uefaaznvea-ca0662.jpg "/>

Find libgd.so.2 =/usr/lib64/libgd.so.2 (0x00007f4383cae000)


Then view the library file that the soft link points to

Ls-al/usr/lib64/libgd.so.2

lrwxrwxrwx 1 root root 5 2014/usr/lib64/libgd.so.2-libgd.so.2.0.0

Use Find to view the location of the library file

Find/-name libgd.so.2.0.0

/usr/lib64/libgd.so.2.0.0


As you can see, the library file for the problem host is missing and the soft link is lost, and the library file and the soft link are in the same directory

Workaround: Bring the library file SCP from another host and set up a soft link

scp/usr/lib64/libgd.so.2.0.0 [Email protected]:/usr/lib64/

Enter the problem host to do a soft link cd/usr/lib64/

ln-s/usr /li b64 /li bgd.so.2.0.0/usr /li b64 /li bgd.so.2


Final problem resolution.

-------------------------------------------------------------------------------------------

Tomcat Debugging Process

Find/-name libjli.so

/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre/lib/amd64/jli/libjli.so

Rpm-aq |grep AVA-1.7.0-OPENJDK

Java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64

Found no this directory:/USR/LIB/JVM/JAVA-1.7.0-OPENJDK-1.7.0.55.X86_64/is due to the lack of a RPM package Yum installation

Error in library file missing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.