安装python时出错:/usr/lib/qgis/crssync:符号查找错误:/usr/lib/libgdal.so.26:未定义符号:GEOSMakeValid_r

问题描述

在 Ubuntu 18.04.5 LTS 上,尝试安装 python3-venv 或尝试卸载 python3.8 时,我收到以下错误,该错误从以下行开始:

/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.26: undefined symbol: GEOSMakeValid_r

有人可以帮我解决这个问题吗?可能出了什么问题? 提前致谢!

❯ sudo apt-get install python3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-venv is already the newest version (3.6.7-1~18.04).
0 upgraded,0 newly installed,0 to remove and 3 not upgraded.
4 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 (3.10.12+dfsg-1~bionic1) ...
/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.26: undefined symbol: GEOSMakeValid_r
dpkg: error processing package qgis-providers (--configure):
 installed qgis-providers package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of qgis:
 qgis depends on qgis-providers (= 3.10.12+dfsg-1~bionic1); however:
  Package qgis-providers is not configured yet.
dpkg: error processing package qgis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-qgis:
 python3-qgis depends on qgis-providers (= 3.10.12+dfsg-1~bionic1); 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 qgis-plugin-grass:
 qgis-plugin-grass depends on qgis (= 3.10.12+dfsg-1~bionic1); however:
  Package qgis is not configured yet.
dpkg: error processing package qgis-plugin-grass (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
    No apport report written because MaxReports is reached already
                                                                  Errors were encountered while processing:
 qgis-providers
 qgis
 python3-qgis
 qgis-plugin-grass
E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方法

尝试在 ubuntu 18.04 上安装 qgis 时遇到了同样的问题和错误消息。

根据此讨论中的提示 https://github.com/OSGeo/gdal/issues/2214,问题似乎是 gdal 需要 geos-3.8.0 或更新版本,而在我的系统上安装了 geos-3.5.0。

从源代码手动安装 geos-3.8.1(在此处找到:https://trac.osgeo.org/geos/)解决了问题并允许我安装 qgis。

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...