在新的服务器安装nginx,在make编译时报错:

make: *** No rule to make target `build', needed by `default'. Stop.

进入nginx的目录,先编译参数:

./configure \

--prefix=/usr/local/nginx \

--pid-path=/usr/local/nginx/run \

--user=nginx \

--group=nginx \

--with-http_ssl_module \

--with-http_flv_module \

--with-http_stub_status_module \

--with-http_gzip_static_module \

--with-pcre \

--with-http_image_filter_module \

--with-debug \

 

然后  make

报错如下:



 

百度上说是要安装前置依赖,像gcc ,openssl等,但是我make之前已经安装了这些依赖。

我的解决方式:

更新yum

yum update

更新完成后,先删除之前准备make的nginx包,然后重新解压一个。

 

安装前置库:

[root@cqakserver local]# yum install -y gcc pcre pcre-devel openssl
openssl-devel gd gd-devel

进入nginx目录重新编译一次参数:

./configure \

--prefix=/usr/local/nginx \

--pid-path=/usr/local/nginx/run \

--user=nginx \

--group=nginx \

--with-http_ssl_module \

--with-http_flv_module \

--with-http_stub_status_module \

--with-http_gzip_static_module \

--with-pcre \

--with-http_image_filter_module \

--with-debug \

 

再次 make && make install 

成功了。





 

 

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信