linux中symbol lookup error解决方法

大家在debian中安装PHP或使用curl git等遇到以下报错

symbol lookup error: /lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation

这个直接去curl官网下载最新版本的便宜安装即可

比如:

Bash

wget https://curl.se/download/curl-8.9.0.tar.gz 
tar zxvf curl-8.9.0.tar.gz
cd curl-8.9.0/
./configure --disable-shared --with-nghttp2 --with-gnutls --with-openssl --with-bearssl --with-amissl --with-mbedtls --with-schannel --with-secure-transport
make
make install
make clean

完成

下载和编译nghttp2

Bash

如果依旧不行请尝试以下方法:

Bash

where curl
ldd /usr/bin/curl
mv /usr/local/lib/libnghttp2.so.14 /usr/local/lib/libnghttp2.so.14.bak
ldconfig

然后尝试一下。

Previous Article

wordpress强制跳转到HTTPS

Write a Comment

Leave a Comment

您的邮箱地址不会被公开。 必填项已用 * 标注

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨