Score:0

Uninstalled QGIS and now cannot reinstall it : qgis-plugin-grass

br flag

Seems to be the same to :

Uninstalled QGIS and now cannot reinstall it ("E: Unable to correct problems, you have held broken packages.")

But i didn't succeed with explanations.

I am using Ubuntu 20.04.3 LTS. I was using QGis version 3.16 on a computer and have a SRC problem. This problem wasn't encountered on other computer with same ubuntu but QGis 3.22. So I want to install Qgis 3.22. I've installed 3.22 whitout uninstalling 3.16 but some installation problems appears. So I've uninstall 3.16 and try installing 3.22 but have some issues i'm know not able to solve after some researches.

I have followed this tutoriel to instal QGis : https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

So after this command line :

sudo apt install qgis qgis-plugin-grass

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.
 qgis-plugin-grass : Depends: grass782
E: Unable to correct problems, you have held broken packages.

I have tried to install grass782 manually :

sudo apt install grass782

Returns :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package grass782 is a virtual package provided by:
  grass-core 7.8.2-1build3 [Not candidate version]
E: Package 'grass782' has no installation candidate

I have tried to install grass-core manually :

sudo apt install grass-core

Returns :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
grass-core is already the newest version (7.8.6-1~focal2).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

When I do :

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

I get :

etc/apt/sources.list:deb [arch=amd64] https://qgis.org/ubuntu focal main
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list.d/spotify.list:deb http://repository.spotify.com stable non-free

Looking for held packages with the command dpkg --get-selections | grep hold, it doesn't return anything.

After command apt-cache policy grass782 :

grass782:
  Installed: (none)
  Candidate: (none)
  Version table:

After command apt-cache policy grass-core :

grass-core:
   Installed: 7.8.6-1~focal2
   Candidate: 7.8.6-1~focal2
   Version table:
 *** 7.8.6-1~focal2 100
        100 /var/lib/dpkg/status
     7.8.2-1build3 500
        500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

After aptitude search ?obsolete :

i   atom                                                       - A hackable text editor for the 21st Century.                         
i   forticlient                                                - FortiClient, now available on Linux, is an endpoint protection applic
i A libgdal30                                                  - Geospatial Data Abstraction Library                                  
i A libgeos3.10.1                                              - Geometry engine for Geographic Information Systems - C++ Library     
i A libotbapplicationengine-7.2-1                              - ORFEO Toolbox library - OTBApplicationEngine                         
i A libotbcarto-7.2-1                                          - ORFEO Toolbox library - OTBCarto                                     
i A libotbcommandline-7.2-1                                    - ORFEO Toolbox library - OTBCommandLine                               
i A libotbcommon-7.2-1                                         - ORFEO Toolbox library - OTBCommon                                    
i A libotbcurladapters-7.2-1                                   - ORFEO Toolbox library - OTBCurlAdapters                              
i A libotbextendedfilename-7.2-1                               - ORFEO Toolbox library - OTBExtendedFileName                          
i A libotbfuzzy-7.2-1                                          - ORFEO Toolbox library - OTBFuzzy                                     
i A libotbgdaladapters-7.2-1                                   - ORFEO Toolbox library - OTBGdalAdapters                              
i A libotbice-7.2-1                                            - ORFEO Toolbox library - OTBIce                                       
i A libotbimagebase-7.2-1                                      - ORFEO Toolbox library - OTBImageBase                                 
i A libotbimageio-7.2-1                                        - ORFEO Toolbox library - OTBImageIO                                   
i A libotbimagemanipulation-7.2-1                              - ORFEO Toolbox library - OTBImageManipulation                         
i A libotbiobsq-7.2-1                                          - ORFEO Toolbox library - OTBIOBSQ                                     
i A libotbiogdal-7.2-1                                         - ORFEO Toolbox library - OTBIOGDAL                                    
i A libotbiokml-7.2-1                                          - ORFEO Toolbox library - OTBIOKML                                     
i A libotbiolum-7.2-1                                          - ORFEO Toolbox library - OTBIOLUM                                     
i A libotbiomstar-7.2-1                                        - ORFEO Toolbox library - OTBIOMSTAR                                   
i A libotbioonera-7.2-1                                        - ORFEO Toolbox library - OTBIOONERA                                   
i A libotbiorad-7.2-1                                          - ORFEO Toolbox library - OTBIORAD                                     
i A libotblearningbase-7.2-1                                   - ORFEO Toolbox library - OTBLearningBase                              
i A libotbmapla-7.2-1                                          - ORFEO Toolbox library - OTBMapla                                     
i A libotbmathparser-7.2-1                                     - ORFEO Toolbox library - OTBMathParser                                
i A libotbmathparserx-7.2-1                                    - ORFEO Toolbox library - OTBMathParserX                               
i A libotbmetadata-7.2-1                                       - ORFEO Toolbox library - OTBMetadata                                  
i A libotbmonteverdi-7.2-1                                     - ORFEO Toolbox library - OTBMonteverdi                                
i A libotbmonteverdicore-7.2-1                                 - ORFEO Toolbox library - OTBMonteverdiCore                            
i A libotbmonteverdigui-7.2-1                                  - ORFEO Toolbox library - OTBMonteverdiGUI                             
i A libotbossimadapters-7.2-1                                  - ORFEO Toolbox library - OTBOssimAdapters                             
i A libotbossimplugins-7.2-1                                   - ORFEO Toolbox library - OTBOssimPlugins                              
i A libotbpolarimetry-7.2-1                                    - ORFEO Toolbox library - OTBPolarimetry                               
i A libotbprojection-7.2-1                                     - ORFEO Toolbox library - OTBProjection                                
i A libotbqtadapters-7.2-1                                     - ORFEO Toolbox library - OTBQtAdapters                                
i A libotbqtwidget-7.2-1                                       - ORFEO Toolbox library - OTBQtWidget                                  
i A libotbsampling-7.2-1                                       - ORFEO Toolbox library - OTBSampling                                  
i A libotbsiftfast-7.2-1                                       - ORFEO Toolbox library - OTBSiftFast                                  
i A libotbstatistics-7.2-1                                     - ORFEO Toolbox library - OTBStatistics                                
i A libotbstreaming-7.2-1                                      - ORFEO Toolbox library - OTBStreaming                                 
i A libotbsupervised-7.2-1                                     - ORFEO Toolbox library - OTBSupervised                                
i A libotbtestkernel-7.2-1                                     - ORFEO Toolbox library - OTBTestKernel                                
i A libotbvectordatabase-7.2-1                                 - ORFEO Toolbox library - OTBVectorDataBase                            
i A libotbvectordataio-7.2-1                                   - ORFEO Toolbox library - OTBVectorDataIO                              
i A libotbwavelet-7.2-1                                        - ORFEO Toolbox library - OTBWavelet                                   
i A libpdal-base12                                             - Point Data Abstraction Library - libpdal_base                        
i A libpdal-plugin-e57                                         - Point Data Abstraction Library - E57 plugin                          
i A libpdal-plugin-hdf                                         - Point Data Abstraction Library - HDF plugin                          
i A libpdal-plugin-i3s                                         - Point Data Abstraction Library - I3S plugin                          
i A libpdal-util12                                             - Point Data Abstraction Library - libpdal_util                        
i A libproj22                                                  - Cartographic projection library                                      
i   rstudio                                                    - RStudio                                                              
i   zoom                                                       - Zoom Cloud Meetings

I will be very thankfull if someone can try to help me. Thanks !

SOLUTIONING...

I've execute : sudo apt -s install --reinstall grass-core=7.8.2-1build3 --> no error

sudo apt install --reinstall grass-core=7.8.2-1build3 --> OK

So I re-launch : sudo apt install qgis qgis-plugin-grass

But :

Aborted (core dumped)
dpkg: error processing package qgis-providers (--configure):  
   installed qgis-providers package post-installation script subprocess returned error exit status 134

dpkg: dependency problems prevent configuration of qgis:
   qgis depends on qgis-providers (= 1:3.22.2+32focal); however:
Package qgis-providers is not configured yet.
    
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 (= 1:3.22.2+32focal); however: 
   Package qgis is not configured yet.
    
dpkg: error processing package qgis-plugin-grass (--configure):  
   dependency problems - leaving unconfigured 
dpkg: dependency problems prevent configuration of python3-qgis: 
   python3-qgis depends on qgis-providers (= 1:3.22.2+32focal); however:
Package qgis-providers is not configured yet.
    
dpkg: error processing package python3-qgis (--configure):  
   dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure.                                                                                                                   

No apport report written because the error message i ndicates it's a follow-up error from a previous failure.
                                                                
No apport report written because MaxReports has already been reached
Processing triggers for shared-mime- info (1.15-1) ... 
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... 
Processing triggers for mime-support (3.64ubuntu1) ... 
Processing triggers for hicolor-icon-theme (0.17-2) ... 
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... 
Processing triggers for libc-bin (2.31-0ubuntu9.2) ... 
Processing triggers for man-db (2.9.1-1) ... 
Errors were encountered while processing:  
qgis-providers  
qgis  
qgis-plugin-grass  
python3-qgis 
E: Sub-process /usr/bin/dpkg returned an error code (1)

After sudo apt list --installed | grep qgis

libqgis-3d3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-analysis3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-app3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-core3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-customwidgets/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]
libqgis-gui3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-native3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgis-server3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgisgrass7-3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
libqgispython3.22.2/focal,now 1:3.22.2+32focal amd64 [installed,automatic]
otb-qgis/now 7.2.0+dfsg-1~focal3 amd64 [installed,local]
python3-qgis-common/now 1:3.22.2+32focal all [installed,upgradable to: 1:3.22.3+32focal]
python3-qgis/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]
qgis-common/now 1:3.22.2+32focal all [installed,upgradable to: 1:3.22.3+32focal]
qgis-plugin-grass-common/now 1:3.22.2+32focal all [installed,upgradable to: 1:3.22.3+32focal]
qgis-plugin-grass/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]
qgis-provider-grass/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]
qgis-providers-common/now 1:3.22.2+32focal all [installed,upgradable to: 1:3.22.3+32focal]
qgis-providers/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]
qgis/now 1:3.22.2+32focal amd64 [installed,upgradable to: 1:3.22.3+32focal]

After sudo dpkg --dry-run -P $(dpkg -l | grep qgis | awk '{print $2}')

(Reading database ... 252958 files and directories currently installed.)
Would remove or purge otb-qgis (7.2.0+dfsg-1~focal3) ...
Would remove or purge qgis-plugin-grass (1:3.22.2+32focal) ...
Would remove or purge qgis-plugin-grass-common (1:3.22.2+32focal) ...
Would remove or purge qgis-provider-grass (1:3.22.2+32focal) ...
Would remove or purge libqgisgrass7-3.22.2 (1:3.22.2+32focal) ...
Would remove or purge qgis (1:3.22.2+32focal) ...
Would remove or purge qgis-common (1:3.22.2+32focal) ...
Would remove or purge libqgis-app3.22.2 (1:3.22.2+32focal) ...
Would remove or purge python3-qgis (1:3.22.2+32focal) ...
Would remove or purge python3-qgis-common (1:3.22.2+32focal) ...
Would remove or purge qgis-providers (1:3.22.2+32focal) ...
Would remove or purge qgis-providers-common (1:3.22.2+32focal) ...
Would remove or purge libqgis-3d3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgis-analysis3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgis-customwidgets (1:3.22.2+32focal) ...
Would remove or purge libqgis-gui3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgis-native3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgis-server3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgispython3.22.2 (1:3.22.2+32focal) ...
Would remove or purge libqgis-core3.22.2 (1:3.22.2+32focal) ...

dpkg -l| egrep -v '^ii|rc'

iU  python3-qgis                               1:3.22.2+32focal                      amd64        Python bindings to QGIS
iU  qgis                                       1:3.22.2+32focal                      amd64        Geographic Information System (GIS)
iU  qgis-plugin-grass                          1:3.22.2+32focal                      amd64        GRASS plugin for QGIS
iF  qgis-providers                             1:3.22.2+32focal                      amd64        collection of data providers to QGIS
nobody avatar
gh flag
Please can you add `sudo apt update` grass-core version is now 7.8.2-1build3
br flag
Curiously `sudo apt update` returns `All packages are up-to-date.` And when I do `sudo apt-get --only-upgrade install grass-core` it returns `grass-core is already the newest version (7.8.6-1~focal2).`
nobody avatar
gh flag
Please show us `apt-cache policy grass-core`
br flag
I've update the post with result of `apt-cache policy grass-core`
nobody avatar
gh flag
`sudo apt -s install --reinstall grass-core=7.8.2-1build3`this is only a simulation. If no error `sudo apt install --reinstall grass-core=7.8.2-1build3`
br flag
post updated ! always an error...
nobody avatar
gh flag
what a mess. Please try to remove any package wiith qgis in name with dpkg. like `sudo dpkg -P package1 package2 a.s.o` i have no idea where your version from grass-core came, but it is not from the gquis ppa.
br flag
okay... so after `sudo apt list --installed | grep qgis` I remove all the list ? (updated in post.)
nobody avatar
gh flag
yes, `sudo dpkg --dry-run -P $(dpkg -l | grep qgis | awk '{print $2}')` this is also a simulation I'm concernd of this part `Aborted (core dumped)` Please add also `dpkg -l| egrep -v '^ii|rc'`
br flag
Okay, I've just update the post with result of two commands and remove these package with `sudo dpkg -P package1 package2...`
Score:0
pr flag

I have had the same error as you.

qgis-plugin-grass : Depends: grass782 E: Unable to correct problems, you have held broken packages.

I have uninstalled qgis and grass and removed broken packages. I have then reinstalled qgis according to the steps on their website. BUT I have used a different repository with help from this comment , namely:

deb [ arch=amd64 ] https://qgis.org/ubuntugis-ltr focal main

Note, that this is for the LTR version (3.16.xx). In your case, you want:

deb [ arch=amd64 ] https://qgis.org/ubuntugis focal main

As we had the same error, and this seemed to fix my problem, I hope it will also fix yours!

Note: During the steps on their website I came to the error of not being able to add a key. I don't know if this is related to our issue, but I will mention it just to be sure. This answer here helped me.

Pin avatar
cn flag
Pin
For me this command did the trick: sudo add-apt-repository "deb https://qgis.org/ubuntugis $(lsb_release -c -s) main" as is comented here https://github.com/qgis/QGIS/issues/38329#issuecomment-862453938
br flag
thanks. I've try the same. Uninstall grass `sudo dpkg -P grass grass-core grass-doc grass-gui` and reinstall QGis but same error `The following packages have unmet dependencies. qgis-plugin-grass : Depends: grass786 but it is not installable`. Not really the same it was grass782 before
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.