安装nginx的时候,是怎么编译老出错啊

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装nginx的时候,是怎么编译老出错啊相关的知识,希望对你有一定的参考价值。

mkdir /var/log/nginx
mkdir /var/run/nginx
chown daemon:daemon /var/log/nginx -R
chown daemon:daemon /var/run/nginx -R
我已经设置权限啦,还是编译安装不了啊

./configure --prefix=/usr/local/nginx
--error-log-path=/var/log/nginx/error.log
--pid-path=/var/run/nginx/nginx.pid
--lock-path=/var/run/nginx/nginx.lock --user=daemon --group=daemon
--with-rtsig_module --with-select_module --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log --with-pcre --with-pcre=/usr/local/pcre
然后make就出错啦。
Configuration summary
+ using PCRE library: /usr/local/pcre
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/var/run/nginx/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

[root@viintest nginx-1.5.12]# make
make -f objs/Makefile
make[1]: Entering directory `/root/yang-soft/nginx-1.5.12'
cd /usr/local/pcre \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre/Makefile] Error 127
make[1]: Leaving directory `/root/yang-soft/nginx-1.5.12'
make: *** [build] Error 2
谁能解答啊。

 

最后2个,去掉最后一个

参考技术A 详细信息如下:
./configure参数
./configure --prefix=/usr/local/nginx --user=www --group=www
make错误
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz
objs/src/core/ngx_regex.o(.text+0x35d): In function `ngx_pcre_free_studies':
src/core/ngx_regex.c:307: undefined reference to `pcre_free_study'
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] 错误 1
make[1]: Leaving directory `/root/nginx-1.3.5'
make: *** [build] 错误 2
<要加--with-pcre=/root/pcre-8.31>
/root/pcre-8.31是解压pcre后的目录
./configure --prefix=/usr/local/nginx --user=www --group=www --with-pcre=/root/pcre-8.31
-lpthread -lcrypt /root/pcre-8.31/.libs/libpcre.a -lcrypto -lcrypto -lz
make[1]: Leaving directory `/root/nginx-1.3.5'
make -f objs/Makefile manpage
make[1]: Entering directory `/root/nginx-1.3.5'
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
-e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/root/nginx-1.3.5'
参考技术B 什么系统?
出错提示什么?
说清楚,否则没办法回答你

一个关于ctex编译出错的问题

我在一个光盘了下载了一个ctex的模板可是编译的时候出现了
!package ifpdf error :Name clash,\ ifpdf is already defined.
See the ifpdf package documentation for explanation
Type H<return> for immediate help
…..
1.153
?
怎么解决啊?
我的ctex版本是CTeX_2.9.0.152++2
哪位大侠能帮我一下啊?我把那个模板发给你

ifpdf 宏包有问题,你注意检查 不要新建 ifpdf了。
这是宏包升级的缘故。可以加群91940767 有人帮你的追问

谢谢啦。。还是好人多啊

参考技术A 用 \usepackageifpdf

而注释掉
%\newif\ifpdf
%\ifx\pdfoutput\undefined
% \pdffalse
% \else
% \pdfoutput=1
% \pdftrue
% \fi

以上是关于安装nginx的时候,是怎么编译老出错啊的主要内容,如果未能解决你的问题,请参考以下文章

啊Linux上PHP运行出错class XMLWriter'not found怎么解决

[Linux]-Nginx平滑升级

安装了gcc,在搭nginx环境时怎么还是报这个

nginx+php 生成缩略图的时候发现没有jpeg支持安装完了重启php-fpm出错

我的电脑老会出现“调试程序”“应用程序出错”...啥原因啊?

nginx编译安装脚本 | 端口检测