I installed nginx 1.1.19 on my ubuntu 12.04 Server.
Now I want to upgrade it to 1.7.6, I add nginx_signing.key
and apt source for nginx, then run sudo apt-get install --only-upgrade nginx
. But I got this error:
The following packages were automatically installed and are no longer required:
libjpeg8 libgd2-noxpm nginx-full libjpeg-turbo8 nginx-common
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 168 not upgraded.
Need to get 0 B/466 kB of archives.
After this operation, 904 kB of additional disk space will be used.
(Reading database ... 47117 files and directories currently installed.)
Preparing to replace nginx 1.1.19-1ubuntu0.6 (using .../nginx_1.7.6-1~precise_i386.deb) ...
Unpacking replacement nginx ...
dpkg: error processing /var/cache/apt/archives/nginx_1.7.6-1~precise_i386.deb (--unpack):
trying to overwrite '/usr/sbin/nginx', which is also in package nginx-full 1.1.19-1ubuntu0.6
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.7.6-1~precise_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
What's the problem and how to fix it?