Error of nginx startup installation on centos6.0 Virtual Machine-libpcre. so.1 shared library missing

Source: Internet
Author: User

The virtual machine operating system is centos6.0 32-bit. After nginx1.2.0 is configured,

Run/usr/local/nginx/sbin/nginx

When nginx is started, the service cannot be started and the error libpcre. so.1 not found occurs. The solution is as follows:

Run the following command to view the shared library information:

# LDD/usr/local/nginx/sbin/nginx

Shown as follows:

Linux-gate.so.1 => (0x009a9000)
Libpthread. so.0 =>/lib/libpthread. so.0 (0x00e13000)
Libcrypt. so.1 =>/lib/libcrypt. so.1 (0x0027e000)
Libpcre. so.1 =>Not found
Libcrypto. so.10 =>/usr/lib/libcrypto. so.10 (0x002ae000)
Libz. so.1 =>/lib/libz. so.1 (0x00d54000)
Libc. so.6 =>/lib/libc. so.6 (0x005e9000)
/Lib/ld-linux.so.2 (0x00583000)
Libfreebl3.so =>/lib/libfreebl3.so (0x00110000)
Libdl. so.2 =>/lib/libdl. so.2 (0x008e9000)

Run the following command:

# Cd/lib

Because pcre8.3 has been installed in advance, I wonder why the library cannot be found. View the database location:

# Ll libpcre *

Lrwxrwxrwx. 1 Root 16 Apr 27 :42/lib/libpcre. so.0-> libpcre. so.0.0.1
-Rwxr-XR-X. 1 Root 190732 Aug 19 2010/lib/libpcre. so.0.0.1

The PCRE is in stock, but its name is not libpcre. so.1, but libpcre. so.0. Try to create a new link to solve this problem:

# Ln-s libpcre. so.0.0.1 libpcre. so.1

Check again:

# LDD/usr/local/nginx/sbin/nginx

It is OK:

Linux-gate.so.1 => (0x009a9000)
Libpthread. so.0 =>/lib/libpthread. so.0 (0x00e13000)
Libcrypt. so.1 =>/lib/libcrypt. so.1 (0x0027e000)
Libpcre. so.1 =>/lib/libpcre. so.1 (0x005b9000)
Libcrypto. so.10 =>/usr/lib/libcrypto. so.10 (0x002ae000)
Libz. so.1 =>/lib/libz. so.1 (0x00d54000)
Libc. so.6 =>/lib/libc. so.6 (0x005e9000)
/Lib/ld-linux.so.2 (0x00583000)
Libfreebl3.so =>/lib/libfreebl3.so (0x00110000)
Libdl. so.2 =>/lib/libdl. so.2 (0x008e9000)

Restart nginx:

/Usr/local/nginx/sbin/nginx-s reload

Started successfully! The homepage is displayed, and subsequent dynamic Tomcat content pages are displayed successfully.

If centos6 + 64-bit version is used, the module path is/lib64 instead of/lib.

It involves the dependency between modules in Linux. Although this method solves the problem, it does not know any side effects, and these dependencies are not mentioned in general information on the Internet. When you download and install PCRE, only the latest stable version 8.3 is available.

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.