Atualizando o nginx-full 1.2.1 para o nginx 1.2.6 do PPA no Ubuntu 12.10

1

Estou tentando atualizar o nginx 1.2.1 para a versão 1.2.6 no Ubuntu 12.10, mas sem sorte. Eu já instalei o nginx usando apt-get install nginx-full porque eu precisava dos módulos em vez de construir a partir de fontes. Mas agora eu não posso 'sobrescrever' o pacote antigo com o apt-get de baixo

$ apt-get install nginx
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 0 not upgraded.
Need to get 415 kB of archives.
After this operation, 930 kB of additional disk space will be used.
Get:1 http://nginx.org/packages/ubuntu/ quantal/nginx nginx amd64 1.2.6-1~quantal [415 kB]
Fetched 415 kB in 2s (186 kB/s)
Selecting previously unselected package nginx.
(Reading database ... 77029 files and directories currently installed.)
Unpacking nginx (from .../nginx_1.2.6-1~quantal_amd64.deb) ...
----------------------------------------------------------------------

Thanks for using NGINX!

Check out our community web site:
* http://nginx.org/en/support.html

If you have questions about commercial support for NGINX please visit:
* http://www.nginx.com/support.html

----------------------------------------------------------------------
dpkg: error processing /var/cache/apt/archives/nginx_1.2.6-1~quantal_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/nginx', which is also in package nginx-full 1.2.1-2.2
No apport report written because MaxReports is reached already
                                                          dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.2.6-1~quantal_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Eu não quero mexer com todos os sites configurados que eu tenho no nginx, existe um método de atualização seguro neste caso? Eu preciso de realip_module, upstream_module, rewrite_module, memcached_module, headers_module, fastcgi_module mas não sei se o pacote 'nginx' do PPA tem todos os módulos dentro do pacote.

    
por pocesar 17.01.2013 / 06:26

1 resposta

2

Encontrou a resposta do link

Fixing this (in most cases but probably not all) is quite simple: look for path of the file that caused the error - in my first example that would be "/var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb", an run the following command:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb

If "--force-overwrite" doesn't work, you can try "--force-all" instead.

In the above command, replace "/var..." with the exact path to the .deb that caused the error on your computer. If you've installed it from a repository, the .deb is located in /var/cache/apt/archives but if not, it's wherever you've downloaded it (either way, the error should display its exact path so you don't have to look for it manually).

What the above command does is force the overwrite of the file that exists in 2 packages and caused the error. Then, to make sure all the packages have installed successfully, also run the following command:

sudo apt-get install -f

    
por 23.01.2013 / 21:56