报错:
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故障消失。