2017-08-28 74 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的 –