我正在尝试在 Ubuntu 20.04 LTS 上为 gdal 使用 python2 绑定,它的存储库中没有 python-gdal 包,以运行旧的 python2 应用程序。
我尝试从 Ubuntu 18.04 LTS 存储库下载并安装它:
sudo wget -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gdal/python-gdal_2.2.3+dfsg-2_amd64.deb
sudo apt install ./python-gdal_2.2.3+dfsg-2_amd64.deb
但是得到了错误:
The following packages have unmet dependencies. python-gdal : Depends: gdal-abi-2-2-3 but it is not installable Depends: libgdal20 (>= 2.2.2) but it is not installable E: Unable to correct problems, you have held broken packages.
我也运行sudo apt-get dist-upgrade
并apt-cache policy python-gdal libgdal20
输出:
python-gdal: Installed: (none) Candidate: (none) Version table: libgdal20: Installed: (none) Candidate: (none) Version table:
有什么方法可以使用 python-gdal 在 Ubuntu 20 上运行应用程序而不会发生冲突?