#973 closed defect (invalid)

upgrade to 1.10 fails ubuntu 14.04.4 LTS, Trusty Tahr

Reported by: Haarkad@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.9.x
Keywords: Cc:
Sensitive: no
uname -a: Linux ip-10-128-85-97 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.10.0 built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1) built with OpenSSL 1.0.1f 6 Jan 2014 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --add-dynamic-module=debian/extra/njs-1c50334fbea6/nginx --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed'

Description

Hi Folks,

my apologies if this issue should be logged elsewhere. No drop down for 1.10 so using 1.9 Here goes:

When upgrading via apt-get from 1.8.1-1_trusty0 to 1.10.0 got the following error:

The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
19 not fully installed or removed.
Need to get 0 B/639 kB of archives.
After this operation, 2334 kB of additional disk space will be used.
(Reading database ... 76508 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.0-1~trusty_amd64.deb ...
Unpacking nginx (1.10.0-1~trusty) over (1.8.1-1+trusty0) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb (--unpack):
trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.8.1-1+trusty0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Way forward for me was:
===========================
apt-get autoremove libxslt1.1 nginx-common nginx-full
apt-get install nginx
# still complained
apt-get remove nginx-common
apt-get install nginx
# bunch of question about keeping current config
# discovered default directive had gone.

Long Version
============
root@ip-10-128-85-97:/etc/nginx# apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:

libxslt1.1 nginx-common nginx-full

Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:

nginx

1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/639 kB of archives.
After this operation, 2334 kB of additional disk space will be used.
(Reading database ... 102687 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.0-1~trusty_amd64.deb ...
Unpacking nginx (1.10.0-1~trusty) over (1.8.1-1+trusty0) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb (--unpack):

trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.8.1-1+trusty0

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:

/var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

root@ip-10-128-85-97:/etc/nginx# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

root@ip-10-128-85-97:/etc/nginx# apt-get autoremove libxslt1.1 nginx-common nginx-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:

nginx

The following packages will be REMOVED:

libxslt1.1 nginx-common nginx-full

The following packages will be upgraded:

nginx

1 upgraded, 0 newly installed, 3 to remove and 4 not upgraded.
Need to get 0 B/639 kB of archives.
After this operation, 373 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 102687 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.0-1~trusty_amd64.deb ...
Unpacking nginx (1.10.0-1~trusty) over (1.8.1-1+trusty0) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb (--unpack):

trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.8.1-1+trusty0

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:

/var/cache/apt/archives/nginx_1.10.0-1~trusty_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

root@ip-10-128-85-97:/etc/nginx# apt-get remove nginx-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:

nginx nginx-common nginx-full

0 upgraded, 0 newly installed, 3 to remove and 4 not upgraded.
After this operation, 1516 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 102687 files and directories currently installed.)
Removing nginx (1.8.1-1+trusty0) ...
Removing nginx-full (1.8.1-1+trusty0) ...
nginx stop/waiting
Removing nginx-common (1.8.1-1+trusty0) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

root@ip-10-128-85-97:/etc/nginx# 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 4 not upgraded.
Need to get 0 B/639 kB of archives.
After this operation, 2386 kB of additional disk space will be used.
Selecting previously unselected package nginx.
(Reading database ... 102658 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.0-1~trusty_amd64.deb ...


Thanks for using nginx!

Please find the official documentation for nginx here:

Commercial subscriptions for nginx are available on:


Unpacking nginx (1.10.0-1~trusty) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up nginx (1.10.0-1~trusty) ...
Installing new version of config file /etc/default/nginx ...
Installing new version of config file /etc/init.d/nginx ...

Configuration file '/etc/nginx/nginx.conf'

==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.

What would you like to do about it ? Your options are:

Y or I : install the package maintainer's version
N or O : keep your currently-installed version

D : show the differences between the versions
Z : start a shell to examine the situation

The default action is to keep your current version.

--- nginx.conf (Y/I/N/O/D/Z) [default=N] ?

Configuration file '/etc/nginx/fastcgi_params'

==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.

What would you like to do about it ? Your options are:

Y or I : install the package maintainer's version
N or O : keep your currently-installed version

D : show the differences between the versions
Z : start a shell to examine the situation

The default action is to keep your current version.

--- fastcgi_params (Y/I/N/O/D/Z) [default=N] ?
Installing new version of config file /etc/nginx/win-utf ...
Installing new version of config file /etc/nginx/uwsgi_params ...
Installing new version of config file /etc/nginx/scgi_params ...
Installing new version of config file /etc/logrotate.d/nginx ...
nginx start/running, process 14909
Processing triggers for ureadahead (0.100.0-16) ...

After this things look to be working.

Unintended consequence, removed default directive from config. Needed to add it in order for our AWS elb healthcheck to recover.

again, If I am in the wrong place, I apologies.

-Geoff

Change History (1)

comment:1 Changed 19 months ago by fabler

  • Resolution set to invalid
  • Status changed from new to closed

1.8.1-1_trusty0 - was an Ubuntu shipped package, as we use a bit different naming and we have no nginx-common package.
There is no smooth path to upgrade package from one vendor to another, as, for example, they use other config directories like site-avalible, so it is correct to save configs, remove old package, install new one and fix configs manually.

Note: See TracTickets for help on using tickets.