nginx安寨干brotli模块找不到ngx_http_brotli_filter_module.so文件处理

技术分享 2026-01-09

报错:

nginx: [emerg] dlopen() "/opt/nginx/modules/ngx_http_brotli_filter_module.so" failed (libbrotlienc.so.1: cannot open shared object file: No such file or directory) in /opt/nginx/conf/nginx.conf:1

这个原因是ngx_http_brotli_filter_module.so这个文件不在现有的环境变量里,只要把这个文件的所在路径添加到环境变量里就可以了。

echo "/usr/local/lib64" > /etc/ld.so.conf.d/brotli.conf
ldconfig

重试启动nginx故障消失。

评论 (0)

发表评论

最多500字符

验证码

暂无评论

成为第一个评论的人吧!