首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >卸载QGIS,现在无法重新安装它:qgis-plugin

卸载QGIS,现在无法重新安装它:qgis-plugin
EN

Ask Ubuntu用户
提问于 2022-01-07 15:20:51
回答 1查看 1.6K关注 0票数 -1

以下情况似乎是一样的:

卸载QGIS,现在无法重新安装它(“E:无法更正问题,您已经保存了损坏的软件包”)。

但我的解释没有成功。

我正在使用Ubuntu20.04.3 LTS。我在一台计算机上使用了QGis 3.16版本,并且有一个SRC问题。这个问题在其他拥有相同的ubuntu但是QGis 3.22的计算机上没有遇到。所以我想安装Qgis 3.22。我已经安装了3.22白屏,卸载了3.16,但是出现了一些安装问题。因此,我已经卸载3.16并尝试安装3.22,但有一些问题,我知道,无法解决后,一些研究。

我遵循本教程安装QGis:https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

因此,在这个命令行之后:

代码语言:javascript
运行
复制
sudo apt install qgis qgis-plugin-grass

我知道这个错误:

代码语言:javascript
运行
复制
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.

我尝试手动安装grass782:

代码语言:javascript
运行
复制
sudo apt install grass782

返回:

代码语言:javascript
运行
复制
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

我尝试手动安装草芯:

代码语言:javascript
运行
复制
sudo apt install grass-core

返回:

代码语言:javascript
运行
复制
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.

当我这么做时:

代码语言:javascript
运行
复制
grep -v "^#" -r /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sort | uniq    /etc/apt/sources.list

我得到:

代码语言:javascript
运行
复制
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

使用命令dpkg --get-selections | grep hold查找保存的包,它不会返回任何内容。

命令apt-cache policy grass782之后:

代码语言:javascript
运行
复制
grass782:
  Installed: (none)
  Candidate: (none)
  Version table:

命令apt-cache policy grass-core之后:

代码语言:javascript
运行
复制
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

aptitude search ?obsolete之后:

代码语言:javascript
运行
复制
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

如果有人能帮我,我会非常感激的。谢谢!

打住..。

我已经执行:sudo apt -s install --reinstall grass-core=7.8.2-1build3 ->没有错误

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

所以我重新启动:sudo apt install qgis qgis-plugin-grass

但是:

代码语言:javascript
运行
复制
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)

sudo apt list --installed | grep qgis

代码语言:javascript
运行
复制
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]

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

代码语言:javascript
运行
复制
(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’

代码语言:javascript
运行
复制
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
EN

回答 1

Ask Ubuntu用户

发布于 2022-01-27 16:11:27

我和你犯了同样的错误。

:取决于: grass782 E:无法纠正问题,您持有了破损的包.

我已经卸载了qgis和grass,并删除了破碎的软件包。然后,我已经根据他们的网站上的步骤重新安装了qgis。但是,在这句话的帮助下,我使用了一个不同的存储库,即:

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

注意,这是用于LTR版本(3.16.xx)的。就你而言,你想:

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

因为我们有同样的错误,这似乎解决了我的问题,我希望它也能解决你的问题!

注意:在他们的网站上的步骤中,我遇到了无法添加密钥的错误。我不知道这是否与我们的问题有关,但我只想肯定一下。这个这里的回答帮了我。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1385821

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档