1

I'm trying to install the QGIS on my Ubuntu 16, but I'm not able to do it.

First, I've tried to uninstall any QGIS version on my Ubuntu, such as described here and here

After that, I tried to follow the QGIS Documentation and some other pages like here in order to install the QGIS, but to no avail. The console raises the following error:

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

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-qgis is already the newest version (1:3.4.4+24xenial-ubuntugis-1).
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-plugin-grass : Depends: grass760 but it is not installable
E: Unable to correct problems, you have held broken packages.

Then I tried the following this solution, but the console raises the following error:

$ sudo aptitude install qgis python-qgis qgis-plugin-grass

python-qgis is already installed at the requested version (1:3.4.4+24xenial-ubuntugis-1)
python-qgis is already installed at the requested version (1:3.4.4+24xenial-ubuntugis-1)
The following NEW packages will be installed:
  libjs-leaflet{a} libqgis-app3.4.4{a} libqgisgrass7-3.4.4{a} qgis qgis-common{a} qgis-plugin-grass{b} qgis-plugin-grass-common{a} qgis-provider-grass{a} 
  qgis-providers{a} qgis-providers-common{a} 
0 packages upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
Need to get 38,2 MB of archives. After unpacking 130 MB will be used.
The following packages have unmet dependencies:
 qgis-plugin-grass : Depends: grass760 which is a virtual package and is not provided by any available package.

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     qgis-plugin-grass [Not Installed]                  

     Leave the following dependencies unresolved:         
2)     qgis recommends qgis-plugin-grass                  

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

      Install the following packages:                           
1)      libqgis-analysis3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]   
2)      libqgis-app3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]        
3)      libqgis-core3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]       
4)      libqgis-gui3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]        
5)      libqgis-native3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]     
6)      libqgis-server3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]     
7)      libqgisgrass7-3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]     
8)      libqgispython3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]      
9)      python3-qgis [3.4.6+dfsg-1~xenial1 (xenial)]            
10)     python3-qgis-common [3.4.6+dfsg-1~xenial1 (xenial)]     
11)     qgis [3.4.6+dfsg-1~xenial1 (xenial)]                    
12)     qgis-common [3.4.6+dfsg-1~xenial1 (xenial)]             
13)     qgis-plugin-grass [3.4.6+dfsg-1~xenial1 (xenial)]       
14)     qgis-plugin-grass-common [3.4.6+dfsg-1~xenial1 (xenial)]
15)     qgis-provider-grass [3.4.6+dfsg-1~xenial1 (xenial)]     
16)     qgis-providers [3.4.6+dfsg-1~xenial1 (xenial)]          
17)     qgis-providers-common [3.4.6+dfsg-1~xenial1 (xenial)]   

Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
  libjs-leaflet{a} libqgis-analysis3.4.6{a} libqgis-app3.4.6{a} libqgis-core3.4.6{a} libqgis-gui3.4.6{a} libqgis-native3.4.6{a} libqgis-server3.4.6{a} 
  libqgisgrass7-3.4.6{a} libqgispython3.4.6{a} python3-qgis{a} python3-qgis-common{a} qgis qgis-common{a} qgis-plugin-grass qgis-plugin-grass-common{a} 
  qgis-provider-grass{a} qgis-providers{a} qgis-providers-common{a} 
0 packages upgraded, 18 newly installed, 0 to remove and 1 not upgraded.
Need to get 70,6 MB of archives. After unpacking 236 MB will be used.
Do you want to continue? [Y/n/?] y
[...]
Preparing to unpack .../python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb ...
Unpacking python3-qgis-common (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py', which is also in package python-qgis-common 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb ...
Unpacking python3-qgis (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/qgis/__init__.py', which is also in package python-qgis 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
[...]
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb
 /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
dpkg: dependency problems prevent configuration of qgis:
 qgis depends on python3-qgis (= 3.4.6+dfsg-1~xenial1); however:
  Package python3-qgis is not installed.

dpkg: error processing package qgis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
 qgis-plugin-grass depends on qgis (= 3.4.6+dfsg-1~xenial1); however:
  Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
 dependency problems - leaving unconfigured
[...]
Errors were encountered while processing:
 qgis
 qgis-plugin-grass

Current status: 1 (+1) broken.

And now on Ubuntu top menu shows the following error message: Error: BrokenCount > 0 and unmet dependencies

After that, I've tried to fix with this solution, but when I try to use the sudo apt-get install qgis python-qgis qgis-plugin-grass command again, the same error occurs, unfortunately (i.e. qgis-plugin-grass : Depends: grass760 but it is not installable).

Then, I tried to add the python3-qgis, but an error occurs as well:

$ sudo apt-get install python3-qgis

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libqgis-analysis3.4.6 libqgis-core3.4.6 libqgis-gui3.4.6 libqgis-native3.4.6 libqgis-server3.4.6 libqgispython3.4.6 python3-qgis-common
The following NEW packages will be installed:
  libqgis-analysis3.4.6 libqgis-core3.4.6 libqgis-gui3.4.6 libqgis-native3.4.6 libqgis-server3.4.6 libqgispython3.4.6 python3-qgis python3-qgis-common
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 31,9 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial/main amd64 libqgis-core3.4.6 amd64 3.4.6+dfsg-1~xenial1 [6.071 kB]
Get:2 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial/main amd64 libqgis-analysis3.4.6 amd64 3.4.6+dfsg-1~xenial1 [2.620 kB]                            
[...]
Unpacking python3-qgis-common (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py', which is also in package python-qgis-common 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb ...
Unpacking python3-qgis (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/qgis/__init__.py', which is also in package python-qgis 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
 /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb
 /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Even with these errors, the QGIS was "installed", but I'm afraid that according to the above error, this installation may have a problem in the future.

Would anyone know what could be happening? And what could I do to fix it?

Thank you in advance.

EDIT 1:

When I tried to install just the qgis-plugin-grass package, I've figured out that this package was raising the error.

$ sudo apt-get install qgis-plugin-grass

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:
 qgis-plugin-grass : Depends: grass760 but it is not installable
E: Unable to correct problems, you have held broken packages.
rmmariano
  • 896
  • 1
  • 18
  • 32
  • 1
    If you don't get an answer here, you may also want to check on https://gis.stackexchange.com, which has a lot of knowledgeable qgis users. – larsks May 06 '19 at 19:11
  • It is true. Could I send the entire question to there or just create a question that has a link to here? Thank you. – rmmariano May 06 '19 at 19:17

1 Answers1

1

This worked for me on Ubuntu 18:

sudo apt install aptitude
sudo aptitude install qgis qgis-plugin-grass