摘要:復(fù)制代碼報錯信息如下錯誤錯誤解答執(zhí)行命令安裝依賴包。為了讓讀者理解問題,重現(xiàn)上述錯誤過程,命令如下復(fù)制代碼
1、Nginx安裝過程報錯
錯誤一:軟件依賴包未正確安裝問題---PCRE依賴包沒有安裝
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option or install the PCRE library into the system or build the PCRE library
statically from the source with nginx by using --with-pcre= option.
解決方法:yum install pcre pcre-devel -y
錯誤二:軟件依賴包未正確安裝問題---OPENSSL依賴包沒有安裝
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules or install the OpenSSL library
into the system or build the OpenSSL library statically from the source
with nginx by using --with-openssl=
解決方法:yum install openssl openssl-devel -y
錯誤三:編譯安裝pcre編譯軟件時,gcc不全導(dǎo)致報錯(使用yum安裝不存在此問題)。
復(fù)制代碼
報錯信息如下:
[root@gjlin2 pcre-8.30]# make && make install
make all-am
make[l]: Entering directory 7h〇me/gjlin/tools/pcre-8.30*
CXX pcrecpp.lo
libtool: compile : unrecognized option -DHAVE_CONFIG_H
libtool:compile : Try libtool --help for more information.
make[l]:*[pcrecpp.lo]錯誤 1
make[l]:Leaving directory /home/gjlin/tools/pcre-8.30
make : * [all]錯誤 2
解答:執(zhí)行"yum -y install gcc-c++"命令安裝gcc-c++依賴包。
復(fù)制代碼
回到頂部
2、Nginx啟動過程中報錯
錯誤一:nginx軟件重復(fù)啟動產(chǎn)生的錯誤信息
復(fù)制代碼
[root@web01 nginx-1.10.2]# /application/nginx/sbin/nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
解決方法:nginx軟件已經(jīng)啟動無需反復(fù)啟動,如果需要重新啟動需要停止nginx進程或者用reload方式進行重啟
復(fù)制代碼
錯誤二:403報錯
服務(wù)阻止客戶端訪問
服務(wù)端站點目錄中,沒有指定首頁文件信息
錯誤三:啟動 Nginx 時如下報錯"nginx:[emerg]getpwnam(“nginx”)failed"
解答:這是因為沒有對應(yīng)的Nginx服務(wù)用戶,執(zhí)行useradd nginx -s /sbin/nologin -M創(chuàng)建Nginx用戶即可。為了讓讀者理解問題,重現(xiàn)上述錯誤過程,命令如下:
復(fù)制代碼
[root@web tools]# pkill nginx
[root@web tools]# userdel nginx
[root@web tools]# /application/nginx/sbin/nginx
nginx: [emerg] getpwnam(Mnginx") failed
[root@web tools]# useradd nginx -s /sbin/nologin -M
[root@web tools]# /application/nginx/sbin/nginx
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://m.hztianpu.com/yun/126391.html
摘要:想來想去還是想試試把我的博客轉(zhuǎn)成一方面為了管理另一方面實在是感覺請求過多速度太慢可改造性太差經(jīng)過遷移后默認(rèn)主題速度杠杠的顯示時間不到哦安裝本文在環(huán)境下操作環(huán)境需要比較懶貌似自帶還是啥時候裝了不會的自己搜一下安裝和目前最新穩(wěn)定版本是自帶源的版 想來想去還是想試試把我的博客轉(zhuǎn)成Jekyll, 一方面為了git管理, 另一方面實在是感覺請求過多速度太慢, 可改造性太差. 經(jīng)過遷移后, 默認(rèn)主...
閱讀 3772·2023-04-25 20:09
閱讀 3921·2022-06-28 19:00
閱讀 3299·2022-06-28 19:00
閱讀 3322·2022-06-28 19:00
閱讀 3464·2022-06-28 19:00
閱讀 3097·2022-06-28 19:00
閱讀 3368·2022-06-28 19:00
閱讀 2892·2022-06-28 19:00