Start an error after installing Nginx

Source: Internet
Author: User

After installing Nginx, start the error.

[Vagrant@localhost sbin]$ sudo./nginx

./nginx:error while loading shared libraries:libpcre.so.1:cannot open Shared object file:no such file or directory

Execute the LDD command to locate the Nginx dependent shared library file.

Vagrant@localhost sbin]$ LDD $ (Which/usr/local/nginx/sbin/nginx)

Linux-vdso.so.1 => (0x00007fff1b74a000)

libpthread.so.0 =>/lib64/libpthread.so.0 (0x00000032b2600000)

Libcrypt.so.1 =>/lib64/libcrypt.so.1 (0x00000032b3a00000)

Libpcre.so.1 => not found

Libcrypto.so.6 =>/lib64/libcrypto.so.6 (0x00000032b4200000)

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/

Libc.so.6 =>/lib64/libc.so.6 (0x00000032b1a00000)

/lib64/ld-linux-x86-64.so.2 (0x00000032b1600000)

Libdl.so.2 =>/lib64/libdl.so.2 (0x00000032b1e00000)

Libz.so.1 =>/usr/lib64/libz.so.1 (0x00000032b3200000)

It turns out that I didn't find the libpcre.so.1 file.

Enter the lib64 directory and make a soft connection to the libpcre.so.0.0.1.

[Vagrant@localhost lib64]$ cd/lib64/

[Vagrant@localhost lib64]$ sudo ln-s libpcre.so.0.0.1 libpcre.so.1

Once you execute the LDD command again, you can find the Libpcre.so.1 dependent library.

[Vagrant@localhost lib64]$ LDD $ (Which/usr/local/nginx/sbin/nginx)

Linux-vdso.so.1 => (0x00007fffd43d5000)

libpthread.so.0 =>/lib64/libpthread.so.0 (0x00000032b2600000)

Libcrypt.so.1 =>/lib64/libcrypt.so.1 (0x00000032b3a00000)

Libpcre.so.1 =>/lib64/libpcre.so.1 (0x00000032b1e00000)

Libcrypto.so.6 =>/lib64/libcrypto.so.6 (0x00000032b4200000)

Libc.so.6 =>/lib64/libc.so.6 (0x00000032b1a00000)

/lib64/ld-linux-x86-64.so.2 (0x00000032b1600000)

Libdl.so.2 =>/lib64/libdl.so.2 (0x00002aebb7623000)

Libz.so.1 =>/usr/lib64/libz.so.1 (0x00000032b3200000)

OK, you can now successfully start Nginx.

[Vagrant@localhost sbin]$ sudo./nginx

[vagrant@localhost sbin]$ sudo netstat-ntlp | grep nginx

TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 17529/nginx

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.