gpt4 book ai didi

apache - 如何以找不到 libpcre.so.1 的错误重新启动 apache

转载 作者:行者123 更新时间:2023-12-04 19:30:39 25 4
gpt4 key购买 nike

在 Centos 6.8 上,我们尝试重新启动 httpd 并得到一个错误,即找不到 libpcre.so.1。

/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)

不确定发生了什么变化。

有什么建议可以解决吗?

最佳答案

就我而言,只有 libpcre.so.3 可用。所以创建一个从 libpcre.so.3 到 libprce.so.1 的符号链接(symbolic link)来修复这个错误

    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)

让我们找到 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

创建链接
    sudo ln -s libpcre.so.3 libpcre.so.1

它的工作原理
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

希望有所帮助

关于apache - 如何以找不到 libpcre.so.1 的错误重新启动 apache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43484602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com