如果出现关键错误,您可以按照以下说明进行操作地理信息系统。

如果出现关键错误,您可以按照以下说明进行操作地理信息系统。

qgis=3.10我正在尝试在服务器上安装最新版本ubuntu18.04。我按照一些在线教程/帖子操作,但没有成功。

这里有一些信息:

1)我的/etc/apt/sources.list

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

2)apt-get update运行成功

当我尝试运行时sudo apt-get install qgis我得到:

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.10.0 but it is not going to be installed
    Depends: libqgis-app3.10.0 but it is not going to be installed
    Depends: libqgis-core3.10.0 but it is not going to be installed
    Depends: libqgis-gui3.10.0 but it is not going to be installed
    Depends: python3-qgis (= 1:3.10.0+28bionic) but it is not going to be installed
    Depends: qgis-providers (= 1:3.10.0+28bionic) but it is not going to be installed
    Recommends: qgis-plugin-grass but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

有人能帮我吗?

编辑1

运行apt-cache policy唯一与 qgis 相关的条目是:

 500 https://qgis.org/ubuntu bionic/main amd64 Packages
 release o=QGIS project,a=bionic,n=bionic,l=QGIS   repository,c=main,b=amd64
 origin qgis.org

编辑2

grep -r ^deb /etc/apt/ --include="*.list"

/etc/apt/sources.list.d/developer_download_nvidia_com_compute_machine_learning_repos_ubuntu1804_x86_64.list:deb http://developer.download.nvidia.com/compute/machine-learning   /repos/ubuntu1804/x86_64 /
/etc/apt/sources.list.d/developer_download_nvidia_com_compute_cuda_repos_ubuntu1804_x86_64.list:deb [trusted=yes] http://developer.download.nvidia.com/compute/cuda/repos   /ubuntu1804/x86_64 /
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic-updates universe
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
/etc/apt/sources.list:deb http://nova.clouds.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list:deb https://qgis.org/ubuntu bionic main

apt-cache policy qgis qgis-providers qgis-plugin-grass libgdal20

qgis:
  Installed: (none)
  Candidate: 1:3.10.0+28bionic
  Version table:
 1:3.10.0+28bionic 500
    500 https://qgis.org/ubuntu bionic/main amd64 Packages
 2.18.17+dfsg-1 500
    500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
qgis-providers:
  Installed: (none)
  Candidate: 1:3.10.0+28bionic
  Version table:
 1:3.10.0+28bionic 500
    500 https://qgis.org/ubuntu bionic/main amd64 Packages
 2.18.17+dfsg-1 500
    500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
qgis-plugin-grass:
 Installed: (none)
 Candidate: 1:3.10.0+28bionic
 Version table:
 1:3.10.0+28bionic 500
    500 https://qgis.org/ubuntu bionic/main amd64 Packages
 2.18.17+dfsg-1 500
    500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
libgdal20:
 Installed: 2.4.0+dfsg-1~bionic0
 Candidate: 2.4.0+dfsg-1~bionic0
 Version table:
*** 2.4.0+dfsg-1~bionic0 100
    100 /var/lib/dpkg/status
 2.2.3+dfsg-2 500
    500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

答案1

根据ubuntugis 文档“现在可以使用一个方便的新命令通过命令行添加 Launchpad PPA(个人软件包存档)存储库:add-apt-repository。”

对于稳定的 PPA:

sudo add-apt-repository ppa:ubuntugis/ppa

添加此 PPA消除来自 /etc/apt/sources.list 的句子:

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

之后安装 QGIS:

sudo apt update
sudo apt install qgis python3-qgis qgis-plugin-grass

如果出现关键错误,您可以按照以下说明进行操作地理信息系统

添加 qgis.org 存储库公钥:

wget -O - https://qgis.org/downloads/qgis-2019.gpg.key | gpg --import
gpg --fingerprint 51F523511C7028C3

gpg --export --armor 51F523511C7028C3 | sudo apt-key add -

这对我有用。如果你也遇到同样的问题,你应该试试这个。

相关内容