Bug report #14395

Cannot install on ubuntu xenial

Added by Thomas Bonfort about 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:2.14.0 Regression?:No
Operating System:ubuntu linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22376

Description

Using http://qgis.org/debian/ xenial repo (but also on debian-nightly) the installation of qgis 2.14 fails with this error:

dpkg: error processing archive /var/cache/apt/archives/qgis_1%3a2.14.0+24xenial_amd64.deb (--unpack):
trying to overwrite '/usr/bin/qgis.bin', which is the diverted version of '/usr/bin/qgis' (package: qgis-provider-grass)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

I can provide more info if requested, but this is a pretty barebones installation of ubuntu xenial (ubuntugis is not installed).


Related issues

Related to QGIS Application - Bug report #13310: nightly build packages failing to install with grass error Closed 2015-09-01
Duplicates QGIS Application - Bug report #13900: Debian upgrade to 2.8.4 Closed 2015-11-29
Duplicates QGIS Application - Bug report #14389: Gras plugin conflict updating to 2.8.7 Closed 2016-02-29

History

#1 Updated by Jürgen Fischer about 8 years ago

  • Status changed from Open to Feedback
  • Operating System changed from ubuntu linus to ubuntu linux

And you don't have a stale diversion leftover from a previous installation (dpkg-divert --list | grep qgis)? Because the current package doesn't use diversions anymore and the above diversion should come from a nightly that dates back to the period where GRASS7 support was only in the provider, but not yet in the plugin - hence the diversion was moved from the plugin to the provider, later when GRASS7 support in the plugin appeared back to the plugin and finally completely removed.

#2 Updated by Thomas Bonfort about 8 years ago

$ dpkg-divert --list | grep qgis
diversion of /usr/bin/qbrowser to /usr/bin/qbrowser.bin by qgis-provider-grass
diversion of /usr/bin/qgis to /usr/bin/qgis.bin by qgis-provider-grass

qgis-provider-grass is 2.14.0

I had a previous install of qgis (wily version from ubuntu repos) but all of those packages were purged before trying to install the qgis.org debs.

#3 Updated by Jürgen Fischer about 8 years ago

Thomas Bonfort wrote:

I had a previous install of qgis (wily version from ubuntu repos) but all of those packages were purged before trying to install the qgis.org debs.

Unfortunately purging doesn't help (current packages don't know qgis-provider-grass could have some - as said those only (intentionally) existed for a short period anyway).

Please just remove the diversions:

dpkg-divert --remove /usr/bin/qgis
dpkg-divert --remove /usr/bin/qbrowser

#4 Updated by Jürgen Fischer about 8 years ago

  • Status changed from Feedback to Closed

#5 Updated by Jürgen Fischer about 8 years ago

  • Status changed from Closed to Feedback

#6 Updated by Ian Goddard about 8 years ago

Applied the changes as above. Still fails.

# dpkg-divert --remove /usr/bin/qgis
Removing 'diversion of /usr/bin/qgis to /usr/bin/qgis.bin by qgis-plugin-grass'
# dpkg-divert --remove /usr/bin/qbrowser
Removing 'diversion of /usr/bin/qbrowser to /usr/bin/qbrowser.bin by qgis-plugin-grass'
# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  qgis-provider-grass
The following NEW packages will be installed:
  qgis-provider-grass
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,025 kB of archives.
After this operation, 1,273 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
(Reading database ... 280364 files and directories currently installed.)
Unpacking qgis-provider-grass (from .../qgis-provider-grass_1%3a2.8.7+12wheezy_i386.deb) ...
Adding 'diversion of /usr/bin/qgis to /usr/bin/qgis.bin by qgis-provider-grass'
dpkg-divert: error: rename involves overwriting `/usr/bin/qgis.bin' with
  different file `/usr/bin/qgis', not allowed
dpkg: error processing /var/cache/apt/archives/qgis-provider-grass_1%3a2.8.7+12wheezy_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/qgis-provider-grass_1%3a2.8.7+12wheezy_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

#7 Updated by Bas Couwenberg about 8 years ago

In #14289 Jürgen Fischer wrote:

should be fixed in 7489af8

The qgis.preinst only removes the diversion provided by qgis-plugin-grass, in 2.8 the diversions were provided by qgis-provider-grass and those are not removed.

This issue also affected the qgis package in Debian as reported in Debian Bug #817176, there the upgrade is from 2.8.x which requires the diversion to also be removed for the qgis-provider-grass package.

For Debian I've changed qgis.preinst to remove the diversions for both qgis-plugin-grass and qgis-provider-grass with:

# Remove obsolete diversions
for i in /usr/bin/qgis /usr/bin/qbrowser; do
    pkg=$(dpkg-divert --listpackage $i)
    if [ -n "$pkg" -a "$pkg" = qgis-plugin-grass -o "$pkg" = qgis-provider-grass ]; then
        dpkg-divert --package $pkg --rename --remove $i
    fi
done

#8 Updated by Jürgen Fischer almost 8 years ago

  • Status changed from Feedback to Closed

fixed in e62d8fe

Also available in: Atom PDF