Não é possível instalar o nginx no ubuntu 14.04

1

Eu continuo recebendo este erro ao instalar o nginx em 14.04

sudo apt-get install nginx
[sudo] password for : 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nginx
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 449 kB of archives.
After this operation, 1,004 kB of additional disk space will be used.
Get:1 http://nginx.org/packages/ubuntu/ saucy/nginx nginx amd64 1.6.0-1~saucy [449 kB]
Fetched 449 kB in 5s (83.9 kB/s)
Selecting previously unselected package nginx.
(Reading database ... 245435 files and directories currently installed.)
Preparing to unpack .../nginx_1.6.0-1~saucy_amd64.deb ...
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* http://nginx.org/en/docs/

Commercial subscriptions for nginx are available on:
* http://nginx.com/products/

----------------------------------------------------------------------
Unpacking nginx (1.6.0-1~saucy) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.6.0-1~saucy_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/nginx', which is also in package nginx-light 1.4.6-1ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nginx_1.6.0-1~saucy_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Alguém poderia me ajudar?

Obrigado,

Eu não consigo remover o nginx-light também

sudo apt-get purge nginx-light
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  nginx-light*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 763 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 244088 files and directories currently installed.)
Removing nginx-light (1.4.6-1ubuntu3.1) ...
invoke-rc.d: initscript nginx, action "stop" failed.
dpkg: error processing package nginx-light (--purge):
 subprocess installed pre-removal script returned error exit status 1
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
2014/10/20 07:48:56 [emerg] 4626#0: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 nginx-light
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Adithya 20.10.2014 / 03:17

1 resposta

1

Tente criar os arquivos que o NGINX está reclamando:

sudo touch /var/log/nginx/error.log
sudo touch /etc/nginx/nginx.conf

Em seguida, tente removê-lo:

sudo apt-get install nginx-light

Finalmente, instale o NGINX:

sudo apt-get install nginx
    
por Kaz Wolfe 20.10.2014 / 09:44