Я пытаюсь установить библиотеки разработки GDAL и GDAL на Ubuntu 20.04 с помощью следующих команд (источник: https://mothergeo-py.readthedocs.io/en/latest/development/how- to / gdal-ubuntu-pkg.html ):
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
ogrinfo --version
GDAL успешно устанавливается и возвращается:
GDAL 3.0.4, released 2020/01/28
После этого я попытался установить библиотеки разработки GDAL:
sudo apt-get install libgdal-dev
Он возвращает следующую ошибку:
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:
libgdal-dev : Depends: libpq-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What проблема здесь? Я где-то читал, что «стабильный ppa UbuntuGIS (launchpad.net/~ubuntugis/+archive/ubuntu/ppa) не имеет пакетов 20.04». Есть ли обходной путь для этого? Все работает, если я попробую на Ubuntu 18.04.
Вам не нужно добавлять репозиторий apt для Ubuntu 20.04. Просто выполните:
sudo apt update
. sudo apt install libpq-dev gdal-bin libgdal-dev