1 |
#
/usr/local/nginx/sbin/nginx |
2 |
/usr/ local /nginx/sbin/nginx:
error while loading
shared libraries: libpcre.so.1: cannot open shared
object file :
No such file or
directory
|
It can be seen from the error message that it is caused by the lack of lib files. Further check the specific content:
1 |
#
ldd $(which /usr/local/nginx/sbin/nginx) |
2 |
libpthread.so.0
=> /lib64/libpthread.so.0 (0x00000030e8400000)
|
3 |
libcrypt.so.1
=> /lib64/libcrypt.so.1 (0x00000030f9a00000)
|
4 |
libpcre.so.1
=> not found
|
5 |
libcrypto.so.6
=> /lib64/libcrypto.so.6 (0x00000030f2a00000)
|
6 |
libz.so.1
=> /lib64/libz.so.1 (0x00000030e8800000)
|
7 |
libc.so.6
=> /lib64/libc.so.6 (0x00000030e7800000)
|
8 |
/lib64/ld-linux- x86-64.so.2
(0x00000030e7400000)
|
9 |
libdl.so.2
=> /lib64/libdl.so.2 (0x00000030e8000000)
|
View the results: libpcre.so.1 => not found ,Also pay attention to the path of the lib library, there is / lib/* and /lib64/* .
For example, the above is /lib64/*,This is related to the soft connection created when solving the problem below
Solution:
1. First, confirm that the pcre software has been installed (nginx depends on this software)
2. Create a soft connection
For /lib/* 32-bit system:
6
|
#
ln -s /lib/libpcre.so.0.0.1 /lib/libpcre.so.1 |
ps: It is also possible that the pcre lib file is in the directory: /usr/local/lib/
For /lib64/* 64-bit systems:
2 |
#
ls /lib64/ |grep pcre |
6 |
#
ln -s /lib64/libpcre.so. 0.0 . 1 /lib64/libpcre.so. 1
|
ps: The pcre lib file is in Directory: /usr/local/lib64/.
The above introduces the Nginx startup error: error while loading shared libraries: libpcreso1, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn