Q:

How to restart apache with error that libpcre.so.1 is not found

On Centos 6.8, we tried to restart httpd and got an error that libpcre.so.1 is not found.
/usr/local/apache-2.4.16/bin/httpd -k stop
ldd ./httpd 
        linux-vdso.so.1 =>  (0x00007fff465ff000)
       **libpcre.so.1 => not found**
       libaprutil-1.so.0 => /usr/local/apache-2.4.16/lib/libaprutil-1.so.0 (0x00007f5cf17d3000)
       libexpat.so.0 => /usr/local/apache-2.4.16/lib/libexpat.so.0 (0x00007f5cf15ac000)
       libapr-1.so.0 => /usr/local/apache-2.4.16/lib/libapr-1.so.0 (0x00007f5cf1379000)
       librt.so.1 => /lib64/librt.so.1 (0x0000003351400000)
       libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003353000000)
       libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003351000000)
       libc.so.6 => /lib64/libc.so.6 (0x0000003350c00000)
       /lib64/ld-linux-x86-64.so.2 (0x0000003350400000)
       libfreebl3.so => /lib64/libfreebl3.so (0x0000003353400000)
       libdl.so.2 => /lib64/libdl.so.2 (0x0000003350800000)

Not sure what has changed.
Any suggestions to fix?

A:

Well in my case, only libpcre.so.3 is available. So create a symbolic link from libpcre.so.3 to libprce.so.1 fix that bug
    ldd swig 
        linux-vdso.so.1 =>  (0x00007fffd6137000)
        libpcre.so.1 => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd64fcb6000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd64faa0000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd64f6d6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd64f3cd000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd650038000)

Let's find the prce.so.1
    ldconfig -p | grep libpcre
        libpcre32.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre32.so.3
        libpcre32.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre32.so
        libpcre16.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre16.so.3
        libpcre16.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre16.so
        libpcre2-32.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-32.so.0
        libpcre2-32.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-32.so
        libpcre2-16.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-16.so.0
        libpcre2-16.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-16.so
        libpcre2-8.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
        libpcre2-8.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-8.so
        libpcre2-posix.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-posix.so.0
        libpcre2-posix.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre2-posix.so
        libpcreposix.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcreposix.so.3
        libpcreposix.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcreposix.so
        libpcrecpp.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcrecpp.so.0
        libpcrecpp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcrecpp.so
        libpcre.so.3 (libc6,x86-64) => /lib/x86_64-linux-gnu/libpcre.so.3
        libpcre.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre.so
        libpcre++.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre++.so.0
        libpcre++.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcre++.so

Create link
    sudo ln -s libpcre.so.3 libpcre.so.1

ow it work
ldd swig
    linux-vdso.so.1 =>  (0x00007ffca79e1000)
    libpcre.so.1 => /lib/x86_64-linux-gnu/libpcre.so.1 (0x00007f53a15ed000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f53a126b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f53a1055000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f53a0c8b000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f53a0a6e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x

Hope that help

