4

In the fall of 2018, I successfully installed QGIS 3.x on my old Xubuntu 18.04 laptop (it keeps updating, and now it is 3.6). A couple of months ago I had to move to another laptop (again under Xubuntu 18.04) but this time, no matter which depository I add, installation ends up with roughly the same errors:

python-qgis : Depends: libqgis-analysis3.6.0 but it is not going to be installed
qgis : Depends: gdal-abi-2-2-3
    Depends: python3-qgis (= 1:3.6.1+28bionic) but it is not going to be installed
qgis-plugin-grass : Depends: grass740

Attempts to install these packages ended up quick with unmet dependencies. The repositories I tried for sure are:

deb https://qgis.org/debian bionic main

deb https://qgis.org/ubuntugis bionic main

deb https://qgis.org/ubuntu-ltr/ bionic main
deb-src https://qgis.org/ubuntu-ltr/ bionic main

The advices I followed (unsuccessfully): (1) https://www.gis-blog.com/how-to-install-qgis-3-on-ubuntu/ (2) https://linuxhint.com/install-qgis3-geospatial-ubuntu/ (the latter worked perfectly well in the fall of 2018). I also checked several threads on StackExchange (e. g. this one and this one).

UPD: After several unsuccessfull attempts to remove/purge QGIS I came to the following. Now, it seems, python3-qgis is in its newest version (the one demanded once by QGIS to be installed)

python3-qgis is already the newest version (1:3.6.1+28bionic-ubuntugis).

Now, with different releases of QGIS I face the following problems:

For https://qgis.org/ubuntu-ltr (3.4 Madeira)

python3-qgis is already the newest version (1:3.6.1+28bionic-ubuntugis).
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:
 qgis : Depends: gdal-abi-2-2-3
        Depends: libqgis-analysis3.4.6 but it is not going to be installed
        Depends: libqgis-app3.4.6 but it is not going to be installed
        Depends: python3-qgis (= 1:3.4.6+28bionic) but 1:3.6.1+28bionic-ubuntugis is to be installed
 qgis-plugin-grass : Depends: grass740
                     Depends: libqgis-app3.4.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

For https://qgis.org/ubuntu (3.6 Noosa)

python3-qgis is already the newest version (1:3.6.1+28bionic-ubuntugis).
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:
 qgis : Depends: gdal-abi-2-2-3
        Depends: python3-qgis (= 1:3.6.1+28bionic) but 1:3.6.1+28bionic-ubuntugis is to be installed
 qgis-plugin-grass : Depends: grass740
E: Unable to correct problems, you have held broken packages.

For https://qgis.org/ubuntugis (3.6 Noosa / Release with ubuntugis-unstable dependencies)

python3-qgis is already the newest version (1:3.6.1+28bionic-ubuntugis).
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:
 qgis : Depends: python3-qgis (= 3.4.6+dfsg-1~bionic1) but 1:3.6.1+28bionic-ubuntugis is to be installed
E: Unable to correct problems, you have held broken packages.

UPD2: I tried sudo apt-get --purge remove python3-qgis and then, again, sudo apt-get install qgis python3-qgis qgis-plugin-grass, which resulted in the following:

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:
 python3-qgis : Depends: python3-qgis-common (= 3.4.6+dfsg-1~bionic1) but 1:3.6.1+28bionic-ubuntugis is to be installed
E: Unable to correct problems, you have held broken packages.
  • 1
    have you tried a sudo apt-get purge? – DPSSpatial Apr 13 at 22:02
  • Yes, I did `sudo apt purge qgis* python-qgis* --auto-remove' – Alexei Kouprianov Apr 14 at 6:52
  • you use the same packages to remove/purge as you installed: python3-qgis, etc. – DPSSpatial Apr 14 at 21:42
  • Yes, this i did too, and it didn't help in itself. It seems that I failed to specify the repo correctly (see my answer to the question posted yesterday). The correct repo's address solved the problem. – Alexei Kouprianov Apr 15 at 4:25
3

It seems that I used a wrong string to indicate the repo's address. The correct strings for /etc/apt/sources.list are:

deb https://qgis.org/ubuntugis/ bionic main
deb-src https://qgis.org/ubuntugis/ bionic main

After editing /etc/apt/sources.list (with sudo nano /etc/apt/sources.list in my case), naturally,

$ sudo apt-get update

and

$ sudo apt-get install qgis python3-qgis qgis-plugin-grass

solved the problem.

  • I have been struggling with this for a couple days now! Thank you for posting the answer. It worked like a charm. – A_R Jul 10 at 23:58

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.