2

I am using Ubuntu version 16.04. It all started when I wanted to test out a pre-release of a software called QGIS. I was having trouble updating it to the new version (2.99) and it recommended that I should uninstall the current version (2.18), which is what I did.

Now, I can install neither the 2.99 version, nor the 2.18 one. I just want to get version 2.18 reinstalled because I really need it.

Basically, to install QGIS 2.18, I used the following commands:

sudo apt-get update
sudo apt-get install qgis python-qgis qgis-plugin-grass

But when I do, I get this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-qgis : Depends: python-qscintilla2 but it is not going to be installed
 qgis-plugin-grass : Depends: grass703
E: Unable to correct problems, you have held broken packages.

I have tried to install grass703 manually (the package name is actually grass-core), but it says that it is already at the latest version (7.2.1-1~xenial1).

I have also tried to look for held packages with the command dpkg --get-selections | grep hold, which doesn't return anything.

I found what seemed to be the same problem here, but I tried the suggestion in the only answer, which did not work. The only other feedback was (in my opinion a rather snarky and unhelpful berating), telling them to uninstall all packages from that source. I installed purge-ppa and removed everything from the non-ubuntu source (-o ubuntugis, referring to the ubuntugis team, which I had previously installed some packages from to try and make the 2.99 version of QGIS work.) Still no help, and QGIS itself will not install.

No amount of sudo apt-get update will seem to solve this problem and I am getting desperate. Does anyone have any idea how I can fix this? I really need to get QGIS installed again in some working capacity.

This is the contents of my /etc/apt/sources.list:

# deb cdrom:[Xubuntu 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://qgis.org/debian xenial main
deb-src http://qgis.org/debian xenial main

#deb http://qgis.org/debian-nightly xenial main
#deb-src http://qgis.org/debian-nightly xenial main
#deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main

and this is the content of sources.list.d/:

-rw-r--r-- 1 root root 146 Jan  5 12:49 colingille-ubuntu-freshlight-xenial.list
-rw-r--r-- 1 root root 146 Jan  5 12:49 colingille-ubuntu-freshlight-xenial.list.save
-rw-r--r-- 1 root root 222 Jan  5 12:49 cooperjona-ubuntu-nitrotasks-xenial.list
-rw-r--r-- 1 root root 222 Jan  5 12:49 cooperjona-ubuntu-nitrotasks-xenial.list.save
-rw-r--r-- 1 root root 158 Jan  5 12:49 fyrmir-ubuntu-livewallpaper-stable-xenial.list
-rw-r--r-- 1 root root 158 Jan  5 12:49 fyrmir-ubuntu-livewallpaper-stable-xenial.list.save
-rw-r--r-- 1 root root 189 Jan  5 12:49 google-chrome.list
-rw-r--r-- 1 root root 189 Jan  5 12:49 google-chrome.list.save
-rw-r--r-- 1 root root 175 Jan  5 12:49 google-earth.list
-rw-r--r-- 1 root root 175 Jan  5 12:49 google-earth.list.save
-rw-r--r-- 1 root root 180 Jan  5 12:49 google-talkplugin.list
-rw-r--r-- 1 root root 180 Jan  5 12:49 google-talkplugin.list.save
-rw-r--r-- 1 root root 150 Jan  5 12:49 kakrueger-ubuntu-openstreetmap-xenial.list
-rw-r--r-- 1 root root 150 Jan  5 12:49 kakrueger-ubuntu-openstreetmap-xenial.list.save
-rw-r--r-- 1 root root 146 Jan  5 12:49 kubuntu-ppa-ubuntu-backports-xenial.list
-rw-r--r-- 1 root root 146 Jan  5 12:49 kubuntu-ppa-ubuntu-backports-xenial.list.save
-rw-r--r-- 1 root root  89 Jan  5 12:49 lightzone.list
-rw-r--r-- 1 root root  89 Jan  5 12:49 lightzone.list.save
-rw-r--r-- 1 root root 501 Jan  5 12:49 mysql.list
-rw-r--r-- 1 root root 500 Jan  5 12:49 mysql.list.save
-rw-r--r-- 1 root root 246 Jan  5 12:49 nathan-renniewaldock-ubuntu-qdirstat-xenial.list
-rw-r--r-- 1 root root 246 Jan  5 12:49 nathan-renniewaldock-ubuntu-qdirstat-xenial.list.save
-rw-r--r-- 1 root root 144 Jan  5 12:49 nilarimogard-ubuntu-webupd8-xenial.list
-rw-r--r-- 1 root root 144 Jan  5 12:49 nilarimogard-ubuntu-webupd8-xenial.list.save
-rw-r--r-- 1 root root 124 Jan  5 12:49 pgdg.list
-rw-r--r-- 1 root root 124 Jan  5 12:49 pgdg.list.save
-rw-r--r-- 1 root root 207 Jan  5 12:49 pipelight-ubuntu-stable-xenial.list
-rw-r--r-- 1 root root 207 Jan  5 12:49 pipelight-ubuntu-stable-xenial.list.save
-rw-r--r-- 1 root root 126 Jan  5 12:49 shutter-ubuntu-ppa-xenial.list
-rw-r--r-- 1 root root 126 Jan  5 12:49 shutter-ubuntu-ppa-xenial.list.save
-rw-r--r-- 1 root root  56 Jan  5 12:49 skype-stable.list
-rw-r--r-- 1 root root  56 Jan  5 12:49 skype-stable.list.save
-rw-r--r-- 1 root root 148 Jan  5 12:49 steam.list
-rw-r--r-- 1 root root 148 Jan  5 12:49 steam.list.save
-rw-r--r-- 1 root root 198 Jan  5 12:49 ubuntugis-ubuntu-ppa-xenial.list
-rw-r--r-- 1 root root 130 Jan  5 12:49 ubuntugis-ubuntu-ppa-xenial.list.save
-rw-r--r-- 1 root root 136 Jan  5 12:49 webupd8team-ubuntu-java-xenial.list
-rw-r--r-- 1 root root 136 Jan  5 12:49 webupd8team-ubuntu-java-xenial.list.save
-rw-r--r-- 1 root root 136 Jan  5 12:49 wine-ubuntu-wine-builds-xenial.list
-rw-r--r-- 1 root root 136 Jan  5 12:49 wine-ubuntu-wine-builds-xenial.list.save

The results of aptitude search ?obsolete:

i   fme-desktop-2017                                       - FME Desktop 2017.1.2 Full Installer                             
i   geoda                                                  - GeoDa Software                                                  
i   google-earth-stable                                    - Explore, search and discover the planet                         
i   hl3040cncupswrapper:i386                               - Brother CUPS Inkjet Printer Definitions                         
i   hl3040cnlpr:i386                                       - Brother lpr Inkjet Printer Definitions                          
i   projectlibre                                           - A desktop replacement for Microsoft Project                     
i   rainlendar2-lite                                       - Customizable desktop calendar                                   
i   rstudio                                                - RStudio   

Output of grep -v "^#" -r /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sort | uniq::

/etc/apt/sources.list:
/etc/apt/sources.list.d/colingille-ubuntu-freshlight-xenial.list:deb http://ppa.launchpad.net/colingille/freshlight/ubuntu xenial main
/etc/apt/sources.list.d/cooperjona-ubuntu-nitrotasks-xenial.list:deb http://ppa.launchpad.net/cooperjona/nitrotasks/ubuntu xenial main
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://qgis.org/debian xenial main
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb-src http://qgis.org/debian xenial main
/etc/apt/sources.list.d/fyrmir-ubuntu-livewallpaper-stable-xenial.list:deb http://ppa.launchpad.net/fyrmir/livewallpaper-stable/ubuntu xenial main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/google-earth.list:deb http://dl.google.com/linux/earth/deb/ stable main
/etc/apt/sources.list.d/google-talkplugin.list:deb http://dl.google.com/linux/talkplugin/deb/ stable main
/etc/apt/sources.list.d/kakrueger-ubuntu-openstreetmap-xenial.list:deb http://ppa.launchpad.net/kakrueger/openstreetmap/ubuntu xenial main
/etc/apt/sources.list.d/kubuntu-ppa-ubuntu-backports-xenial.list:deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu xenial main
/etc/apt/sources.list.d/lightzone.list:deb http://download.opensuse.org/repositories/home:/ktgw0316:/LightZone/xUbuntu_15.10/ /
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-apt-config
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-tools
/etc/apt/sources.list.d/mysql.list:deb-src http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7
/etc/apt/sources.list.d/nathan-renniewaldock-ubuntu-qdirstat-xenial.list:deb http://ppa.launchpad.net/nathan-renniewaldock/qdirstat/ubuntu xenial main
/etc/apt/sources.list.d/nilarimogard-ubuntu-webupd8-xenial.list:deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial main
/etc/apt/sources.list.d/pgdg.list:deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
/etc/apt/sources.list.d/pipelight-ubuntu-stable-xenial.list:deb http://ppa.launchpad.net/pipelight/stable/ubuntu xenial main
/etc/apt/sources.list.d/shutter-ubuntu-ppa-xenial.list:deb http://ppa.launchpad.net/shutter/ppa/ubuntu xenial main
/etc/apt/sources.list.d/skype-stable.list:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/steam.list:deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/steam.list:deb-src [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/ubuntugis-ubuntu-ppa-xenial.list:deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu xenial main
/etc/apt/sources.list.d/webupd8team-ubuntu-java-xenial.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
/etc/apt/sources.list.d/wine-ubuntu-wine-builds-xenial.list:deb http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial main
  • Have you tried this: Unable to correct problems, you have held broken packages. PS: I have no more flags today, so I could not mark this as duplicate. – galoget Jan 5 '18 at 13:16
  • What is the output of apt-cache policy grass703? – N0rbert Jan 5 '18 at 13:19
  • Yes, @galoget, I have tried those exact solutions and none of them worked. – wfgeo Jan 5 '18 at 13:20
  • @N0rbert: grass703: Installed: (none) Candidate: (none) Version table: – wfgeo Jan 5 '18 at 13:21
  • Try to find obsolete packages with aptitude search ?obsolete and add output to question. Edit your question with output of grep -v "^#" -r /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sort | uniq for list of enabled deb repositories. – N0rbert Jan 5 '18 at 13:25
2

During chat we did the following steps to fix the problem:

  1. Disabled obsolete repositories from software-properties-gtk:

download.opensuse.org/...
ppa.launchpad.net/colingille/...
ppa.launchpad.net/cooperjona/...
ppa.launchpad.net/kakrueger/...

  1. Purged two PPAs with

    sudo ppa-purge ppa:ubuntugis/ppa
    sudo ppa-purge ppa:kubuntu-ppa/backports
    sudo apt-get install -f
    sudo dpkg --configure -a
    

second of them made problem with python-qscintilla2

  1. Then installed QGIS from qgis.org repository with the following command

    sudo apt-get install qgis python-qgis qgis-plugin-grass
    
  2. Launched QGIS and checked system integrity with

    sudo apt-get check
    
  • 1
    worked with me to solve the problem and it's all working great now. thanks again for your help! you are a life saver! – wfgeo Jan 5 '18 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.