从官网下载源码压缩包 http://nginx.org/download/nginx-1.20.0.tar.gz
解压缩到 ~/downloads/nginx/nginx-1.20.0
切换工作目录到 ~/downloads/nginx/nginx-1.20.0
运行 ./configure
是的,啥配置项都没给。
运行成功,结果为:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/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"
然后继续运行 make
就开始发病了:
objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_random_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/ngx_modules.o \
-ldl -lpthread -lcrypt -lpcre -lz \
-Wl,-E
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/downloads/nginx/nginx-1.20.0'
为什么会出现这个错误?该如何解决呢?谢谢
我全程都是用 root 的身份跑的
1
billlee 2021-05-09 16:36:35 +08:00 1
我怎么感觉已经编译成功了
|
2
Tink 2021-05-09 16:44:10 +08:00 via Android
没毛病
|
3
running17 2021-05-09 16:49:44 +08:00
这不是编译成功了吗 ,应该再执行下 make install 就装完了吧。。。
|
4
Tink 2021-05-09 16:52:40 +08:00 via Android
你从哪看出这是错误了
|
5
mamba 2021-05-10 09:31:44 +08:00
请问这有啥毛病?
|
6
julyclyde 2021-05-10 11:33:29 +08:00
不懂行的人建议别从源码编译
很快你就会遇到 1 缺编译期依赖 2 缺运行期依赖 3 运行的时候需要输入路径 4 安装之后删不干净 |