Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on ubuntu xenial #22376

Closed
qgib opened this issue Mar 1, 2016 · 8 comments
Closed

Cannot install on ubuntu xenial #22376

qgib opened this issue Mar 1, 2016 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@qgib
Copy link
Contributor

qgib commented Mar 1, 2016

Author Name: Thomas Bonfort (@tbonfort)
Original Redmine Issue: 14395
Affected QGIS version: 2.14.0
Redmine category:build/install


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 issue(s): #21368 (relates), #21922 (duplicates), #22370 (duplicates)
Redmine related issue(s): 13310, 13900, 14389


@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2016

Author Name: Jürgen Fischer (@jef-n)


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.


  • status_id was changed from Open to Feedback
  • operating_system was changed from ubuntu linus to ubuntu linux

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2016

Author Name: Thomas Bonfort (@tbonfort)


$ 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.

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2016

Author Name: Jürgen Fischer (@jef-n)


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

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2016

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2016

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Closed to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 6, 2016

Author Name: Ian Goddard (Ian Goddard)


Applied the changes as above. Still fails.

1. dpkg-divert --remove /usr/bin/qgis
Removing 'diversion of /usr/bin/qgis to /usr/bin/qgis.bin by qgis-plugin-grass'
1. dpkg-divert --remove /usr/bin/qbrowser
Removing 'diversion of /usr/bin/qbrowser to /usr/bin/qbrowser.bin by qgis-plugin-grass'
1. 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)

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2016

Author Name: Bas Couwenberg (@sebastic)


In #22281 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":https://bugs.debian.org/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:

1. 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

@qgib
Copy link
Contributor Author

qgib commented May 22, 2016

Author Name: Jürgen Fischer (@jef-n)


fixed in e62d8fe


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant