After Apache is installed, the system prompts that libpcre. so.1 cannot be found at startup:
/Usr/local/apache2/bin/httpd: ErrorWhileLoading shared libraries: libpcre. So.1: Cannot open sharedObject File: No suchFileOr directory
Use LDD to view httpd dependent database information:
# LDD httpdlinux -Vdso. So. 1 => ( 0x00007fff691ff000 ) Libpcre. So. 1 => Not foundlibaprutil - 1 . So.0 =>/Usr/local/apache2/lib/libaprutil- 1 . So. 0 ( 0x00007ff847f31000 ) Libapr - 1 . So. 0 =>/Usr/local/apache2/lib/libapr- 1 . So. 0 ( 0x00007ff847d00000 ) Libpthread. So. 0 = & Gt;/lib/x86_64-linux-gnu/libpthread. So.0 ( 0x00007ff847ae3000 ) Libc. So. 6 /Lib/x86_64-linux-gnu/libc. So. 6 ( 0x00007ff8470000000 ) Libexpat. So. 0 =>/Usr/local/apache2/lib/libexpat. So. 0 ( 0x00007ff8474fb000 ) Libcrypt. So. 1 /Lib/x86_64-linux-gnu/libcrypt. So. 1 (0x00007ff8472c2000 ) Libdl. So. 2 = & Gt;/lib/x86_64-linux-gnu/libdl. So. 2 ( 0x00007ff8470be000 ) /Lib64/ LD -Linux-x86- 64 . So. 2 ( 0x00007ff848165000 )
The libpcre. so.1 library is not found.
Solution:
1. Search for the libpcre. so.1 file and find it in the/usr/local/lib directory.
2. Create the file libc. conf in the/etc/lD. So. conf. d directory and add the/usr/local/lib directory to the file:
/Usr/local/lib
3. Run the ldconfig command:
SudoLdconfig
4. Run the LDD command to check whether libpcre. so.1 has been found:
# LDD httpdlinux -Vdso. So. 1 => ( 0x00007fffcc3ff000 ) Libpcre. So. 1 =>/Usr/local/lib/libpcre. So. 1 ( 0x00007f2f68f98000 ) Libaprutil - 1 . So. 0 =>/Usr/local/apache2/lib/libaprutil-1 . So. 0 ( 0x00007f2f68d76000 ) Libapr - 1 . So. 0 =>/Usr/local/apache2/lib/libapr- 1 . So. 0 ( 0x00007f2f68b45000 ) Libpthread. So. 0 = & Gt;/lib/x86_64-linux-gnu/libpthread. So. 0 ( 0x00007f2f68928000 ) Libc. So. 6 /Lib/x86_64-linux-gnu/libc. So. 6 ( 0x00007f2f6856b000 ) Libexpat. So. 0 =>/Usr/local/apache2/lib/libexpat. So. 0 ( 0x00007f2f68340000 ) Libcrypt. So. 1 /Lib/x86_64-linux-gnu/libcrypt. So. 1 ( 0x00007f2f680000000 ) Libdl. So. 2 = & Gt;/lib/x86_64-linux-gnu/libdl. So. 2 ( 0x00007f2f67f03000 ) /Lib64/ LD -Linux-x86- 64 . So. 2 ( 0x00007f2f691c7000 )