你好,得到这个就可以安装任何东西了。
(base) mi@adib:~$ sudo apt install gnupg software-properties-common
[sudo] password for mi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version (2.2.19-3ubuntu2).
software-properties-common is already the newest version (0.98.9.3).
The following packages were automatically installed and are no longer required:
libgsl23 libgslcblas0 libjs-leaflet libqgis-3d3.16.2 libqgis-analysis3.16.2
libqgis-app3.16.2 libqgis-app3.16.3 libqgis-core3.16.2 libqgis-gui3.16.2
libqgis-native3.16.2 libqgis-server3.16.2 libqgispython3.16.2 libqt5charts5
qgis-common qml-module-qtcharts r-cran-mathjaxr
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up qgis-providers (1:3.16.3+32focal) ...
- 'VirtualXPath' [XML Path Language - XPath]
- 'VirtualXPath' [XML Path Language - XPath]
- 'VirtualXPath' [XML Path Language - XPath]
free(): invalid pointer
Aborted (core dumped)
dpkg: error processing package qgis-providers (--configure):
installed qgis-providers package post-installation script subprocess returned e
rror exit status 134
dpkg: dependency problems prevent configuration of python3-qgis:
python3-qgis depends on qgis-providers (= 1:3.16.3+32focal); however:
Package qgis-providers is not configured yet.
dpkg: error processing package python3-qgis (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-qgis:
python-qgis depends on python3-qgis; however:
Package python3-qgis is not configured yet.
dpkg: error processing package python-qgis (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro
r from a previous failure.
No apport report written because the error message ind
icates its a followup error from a previous failure.
Errors were encountered whil
e processing:
qgis-providers
python3-qgis
python-qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我在更新 QGIS 时遇到了同样的问题。
已经有一个Github 上的错误报告为了它。
您必须手动删除旧版本的 libproj,如错误报告的答案中所述:
# remove offending lib while keeping package dependency installed (wow, ugly):
rm -f /lib/x86_64-linux-gnu/libproj.so.15
ln -s /lib/x86_64-linux-gnu/libproj.so.19 /lib/x86_64-linux-gnu/libproj.so.15
文件夹名称可能与您看到的有所不同,因此请手动查找。
另请参阅此类似GisStackExchange话题。
答案2
为了解决这个问题,我必须手动卸载 libproj*
sudo apt remove libproj15 libproj-dev libproj19
答案3
安装符号链接的正确方法,无需从 root 获得完整路径,因为它们是在官方 Debian / Ubuntu 软件包中设计的。
首先列出系统上安装的所有 libproj 版本
$ apt list libproj*
Listing... Done
libproj-dev/focal,focal,focal,now 8.2.1-1~20.04.sav0 amd64 [installed]
libproj15/focal,now 6.3.1-1 amd64 [installed,automatic]
libproj22/focal,focal,focal,now 8.2.1-1~20.04.sav0 amd64 [installed,automatic]
libprojectm-dev/focal 3.1.12-0~focal amd64
libprojectm2v5/focal 2.1.0+dfsg-4ubuntu3~focal1 amd64
libprojectm3/focal 3.1.12-0~focal amd64
$
/lib
是指向/usr/lib
然后列出所有安装的库
$ ls /usr/lib/x86_64-linux-gnu/libproj.so.*
/usr/lib/x86_64-linux-gnu/libproj.so.15 /usr/lib/x86_64-linux-gnu/libproj.so.22
/usr/lib/x86_64-linux-gnu/libproj.so.15.3.1 /usr/lib/x86_64-linux-gnu/libproj.so.22.2.1
$
但是,libproj.so.15 在终端中显示为青色,表示它是 libproj.so.15.3.1 的符号链接 (symlink)。此外,libproj.so.22 是 libproj.so.22.2.1 的符号链接 (symlink)
因此,我删除了有问题的符号链接 libproj.so.15,并将其重新分配给目标符号链接 libproj.so.22,但我/
在创建时没有从根目录分配完整路径,因为我在目录中的任何地方创建符号链接home
并且不使用sudo
。 之后,将命令移动到目标文件系统目录/usr/lib/x86_64-linux-gnu/
即可解决问题:
$ sudo rm -rf /usr/lib/x86_64-linux-gnu/libproj.so.15
$ ln -s libproj.so.22 libproj.so.15
$ sudo mv libproj.so.15 /usr/lib/x86_64-linux-gnu/
检查系统中半配置的包:
$ dpkg-query -f '${status} ${package}\n' -W | awk '$3 == "half-configured" {print $4}'
qgis-providers
$
重新安装qgis-providers
包:
$ sudo apt-get --reinstall install qgis-providers
答案4
我们来看看这个qgis-providers
包裹。
- Ubuntu 20.04 中的当前版本是3.10.4+dfsg-1ubuntu2
- 您正在尝试安装版本 3.16.3+32focal。
这告诉我们您正在尝试从某些非 Ubuntu 源安装损坏或不兼容的软件包。
如何修复:
- 从非 Ubuntu 源卸载所有软件包。
- 禁用非 Ubuntu 源。
- 然后从 Ubuntu 存储库安装 qgis。
- 向非 Ubuntu 源提交错误报告,让他们知道他们的软件包与 Ubuntu 20.04 不兼容(或已损坏)。