使用官方自动安装的命令
https://modpagespeed.com/doc/...
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
--nginx-version latest
最后一步显示
`
About to build nginx. Do you have any additional ./configure
arguments you would like to set? For example, if you would like
to build nginx with https support give --with-http_ssl_module
If you don't have any, just press enter.
About to configure nginx with:
./configure --add-module=/root/ngx_pagespeed-latest-stable
Does this look right? [Y/n] y
checking for OS
Linux 4.4.0-75-generic x86_64
for C compiler ... not found
./configure: error: C compiler cc is not found
Error: Failure running './configure --add-module=/root/ngx_pagespeed-latest-stable', exiting.
`
我这里没有其他额外的模块安装,所以选择y, 但是不成功。
我使用的是ubuntu 16.0.4
pkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip 这些包我都安装成功了。
网上其他的方法,我也试过,包括
https://zyf.im/2017/05/10/ins...
https://rezhajulio.id/how-to-...
https://www.howtoforge.com/tu...
建议手动安装不用自动安装
https://www.modpagespeed.com/...
然后注意下载POSL
POSL要在解压之后的pagespeed包里面下载,然后编译nginx