无法在 GRASS GIS 上安装扩展

无法在 GRASS GIS 上安装扩展

我一直试图在新安装的 GRASS GIS 7.0 上安装几个扩展(按照说明安装这里),其中包括“i.fusion.hpf”。扩展名似乎并不重要,因为每个扩展名的问题都是一样的。因此,当我运行 g.extension 并尝试添加扩展时,我收到消息

错误:请安装 GRASS 开发包

GRASS 的网站我读到这个错误意味着我必须安装“grass-dev”包。我尝试这样做,但当我在终端中执行此操作时,我收到依赖项错误消息...(法语,后面有翻译)

 ~$ sudo apt install grass-dev
    Reading package lists ... Done
    Building the dependency tree
    Reading status information ...
    Some packages can not be installed. This can mean
    that you asked for the impossible, or, if you use
    the unstable distribution, that some packages have not yet
    been created or did not come out of entering.
    The following information will help you resolve the situation:


    Following packages contain unsatisfied dependencies:
    grass-dev: depends: libgdal-dev but won't be installed
               depends: libpq-dev but won't be installed
    E: impossible to fix problems, defective packages are in "keep as is" mode.

当我尝试安装依赖项时,我基本上会得到与参考其他依赖项相同的答案。由于我不想过多地处理这些依赖项,因此我请求您的帮助 :-)

[编辑] 我尝试了 Abel Tom 的回答,但得到的结果是:

$ sudo apt installs libgdal-dev libpq-dev
Reading package lists ... Done
Building the dependency tree
Reading status information ...
Some packages can not be installed. This can mean
that you asked for the impossible, or, if you use
the unstable distribution, that some packages have not yet
been created or did not come out of entering.
The following information will help you resolve the situation:

The following packages of unmet dependencies:
libpq-dev: Depends: libpq5 (= 9.5.8-0ubuntu0.16.04.1) but 9.5.9-0ubuntu0.16.04 must be installed
E: Unable to fix problems, packages are in "keep as is" mode.

我试过了sudo apt install libpq5,但它已经安装好了....奇怪。而且sudo apt install -f也没有效果....

我尝试卸载并重新安装 GRASS GIS,但没有任何变化……除了现在 QGIS 已卸载(所以我重新安装了它,似乎工作正常)。我尝试更改 ppa。我从 升级到ppa:ubuntugis/ubuntugis-unstable然后ppa:grass/grass-stable降级到 GRASS 7.0。问题更严重,因为我甚至无法访问附加组件数据库!现在我回到了 7.2。

开始觉得是因为这些软件包正在开发中?开发人员可能正在更新它们,因此无法访问它们?说实话,我真的不知道这是怎么回事……此外,在 g.extension 的手册/故障排除中,它说:

由于扩展必须在基于 Unix 的系统(Linux、Mac OSX 等)上进行编译,除非安装了 Python 扩展,因此用户的计算机上必须存在完整的编译器环境。

这是否意味着我可以安装一些 Python 扩展?我真的不确定这是什么意思。

再会,

萘胺

答案1

我能够使用 成功安装 grass-dev sudo apt install grass-dev,我想我已经安装了所有依赖项。我想您已经快完成了,安装下面列出的依赖项,您就可以开始了。

以下是我的grass-dev依赖项:

abel@i5myUbuntu:~$ dpkg --status grass-dev | grep Depends
Depends: grass-core (= 7.2.1-3), fakeroot, libfreetype6-dev, libgdal-dev, libpq-dev, libproj-dev, python, libc6 (>= 2.2.5)

答案2

因此,我偶然发现了此主题并且我设法安装了 grass-dev sudo aptitude install grass-dev

不太清楚资质命令确实如此,但它确实有效!我不得不尝试多个选项来确定要应用哪种解决方案来解决缺少的依赖项,最后我选择了一个安装的解决方案。libgdal-dev其他软件包都降级了。我不知道出于什么目的,但它现在有效了 :-Dlibpq-devLibpq5

相关内容