ubuntu安裝nginx,因爲80端口已經被佔用,sudo apt-get install nginx安裝一半異常退出,報錯誤:
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)nginx
再往上查詢會看到錯誤
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)ubuntu
修復辦法:
1.將80端口解綁,已佔用的程序改用其餘端口,將提示的錯誤解決後 app
2.運行如下命令卸載一半的安裝:
sudo apt-get remove nginx*
sudo apt-get autoremoveide