早上修改nginx配置後,檢查配置是否正常,丟擲錯誤內容:
$ sudo nginx -t
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" version 1016001 instead of 1020001 in /usr/share/nginx/modules/mod-http-image-filter.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
解決方案:
sudo yum update nginx nginx-mod-http-image-filter
// 該命令會同步更新相關依賴的動態模組
更新成功後執行檢查,一切正常
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
本作品採用《CC 協議》,轉載必須註明作者和本文連結