2017-08-28 66 views
0

我新的nginx的和正在此錯誤信息,而如何解決這個nginx的在ubuntu16

命令和apt-get安裝nginx的

任何一個可以幫助我解決這個

 nginx.service - A high performance web server and a reverse proxy server 
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) 
    Active: failed (Result: exit-code) since Mon 2017-08-28 15:12:09 IST; 20ms ago 
    Docs: man:nginx(8) 
    Process: 6656 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) 

    Aug 28 15:12:09 onlyoffice systemd[1]: Starting A high performance web serv..... 
    Aug 28 15:12:09 onlyoffice nginx[6656]: nginx: [emerg] open() "/etc/nginx/ng...) 
    Aug 28 15:12:09 onlyoffice nginx[6656]: nginx: configuration file /etc/nginx...d 
    Aug 28 15:12:09 onlyoffice systemd[1]: nginx.service: Control process exite...=1 
    Aug 28 15:12:09 onlyoffice systemd[1]: Failed to start A high performance w...r. 
    Aug 28 15:12:09 onlyoffice systemd[1]: nginx.service: Unit entered failed state. 
    Aug 28 15:12:09 onlyoffice systemd[1]: nginx.service: Failed with result 'e...'. 
    Hint: Some lines were ellipsized, use -l to show in full. 
    dpkg: error processing package nginx-full (--configure): 
    subprocess installed post-installation script returned error exit status 1 
    dpkg: dependency problems prevent configuration of nginx: 
    nginx depends on nginx-full (<< 1.13.3-0+xenial1.1~) | nginx-light (<< 1.13.3-0+xenial1.1~) | nginx-extras (<< 1.13.3-0+xenial1.1~); however: 
    Package nginx-full is not configured yet. 
    Package nginx-light is not installed. 
    Package nginx-extras is not installed. 
    nginx depends on nginx-full (>= 1.13.3-0+xenial1) | nginx-light (>= 1.13.3-0+xenial1) | nginx-extras (>= 1.13.3-0+xenial1); however: 
    Package nginx-full is not configured yet. 
    Package nginx-light is not installed. 
    Package nginx-extras is not installed. 

    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-full 
    nginx 
    E: Sub-process /usr/bin/dpkg returned an error code (1) 

預先感謝您

+0

嘛錯誤是正確的有:'的dpkg:依賴關係問題的nginx的配置: nginx的取決於nginx的滿(<< 1.13.3 -0 + xenial1.1〜)| nginx的光(<< 1.13.3-0 + xenial1.1〜)| nginx的-額外(<< 1.13.3-0 + xenial1.1〜);但是: ' – Stuart

+0

@Stuart我怎樣才能解決這個 –

+0

爾 - '包nginx的滿還沒有被配置。 包nginx的燈沒有安裝。 包nginx的,演員是不是installed.' – Stuart

回答

1

您可以嘗試使用官方nginx.repo爲Ubuntu(Xenial)

編輯/etc/apt/sources.list中,並在文件末尾添加這些行:

deb http://nginx.org/packages/ubuntu/ codename nginx 
deb-src http://nginx.org/packages/ubuntu/ codename nginx 

保存文件並運行此命令:

sudo apt-get update 
sudo apt-get install nginx 

應該安裝最新版本的nginx的來自nginx官方回購。

如果不工作試運行此命令:

apt-get -f install nginx 

or 

apt-get -f -y install nginx 
+0

謝謝你的快速反應@Bogdan斯托伊卡實際上這是由於版本問題,而不是最新版本,我需要最後的穩定版本 –

+0

這將是最新的穩定版本在其官方回購。 ..請確保您有從可能導致到依賴問題的其他回購沒有安裝其他版本nginx的 –