0

I've been trying to install several extensions on my newly installed GRASS GIS 7.0 (installed following instructions here), amongst them "i.fusion.hpf". The extension doesn't seem to matter as the problem is the same for everyone of them. So when I run g.extension, and try to add an extension, I get the message

ERROR: Please install GRASS development package

On GRASS's website I read that this error meant I had to install the "grass-dev" package. I tried to do so but when I do it in the terminal, I get dependencies error messages... (in french, with translation right after)

 ~$ 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.

When I try to install the dependencies, I basically get the same answers refering to other dependencies. As I don't want' to be messing too much with those, I ask for your kind help :-)

[Edit] I tried Abel Tom's answer but this is what I get:

$ 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.

I tried sudo apt install libpq5 but it's already installed.... strange. And sudo apt install -f didn't work out as well....

I tried uninstalling and reinstalling GRASS GIS but nothing changed... except now QGIS is uninstalled (so I reinstalled it, seems to work fine). I tried changing ppa. I went from ppa:ubuntugis/ubuntugis-unstable to ppa:grass/grass-stable and then downgraded to GRASS 7.0. Problem was even worse as I couldn't even access the add-ons database! Now I'm back on 7.2.

Starting to think it's because the packages are in development, somehow? Could the developers be updating them and thus they are inaccessible? I don't really know how that works to be honest... Also on g.extension's manual/troubleshooting, it says:

Since extensions have to be compiled on Unix based systems (Linux, Mac OSX etc.) unless a Python extension is installed, a full compiler environment must be present on the user's computer.

Does that mean I can install some Python extension? I'm really not sure what this means.

Good day,

Nat Azodnem

  • sudo apt install libgdal-dev libpq-dev, if that does not work,try sudo apt update and sudo apt install -f – Abel Tom Nov 14 '17 at 10:54
  • Didn't work unfortunately... check out my edit for more info ;-) – Nat Azodnem Nov 14 '17 at 20:42
1

I was able to successfully install grass-dev using sudo apt install grass-dev, i guess i had all the dependencies installed already. I guess you're almost there, install the dependencies listed below, and you should be good to go.

Here is a look at my grass-dev dependencies:

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)
  • Hey thanks for your answer! Unfortunately, that didn't work either... the only dependency that wasn't already there is libc6 (which is now installed). As to libgdal-dev and libpq-dev, the problem remains the same (it sends me back to that libpq5 package that is already there). So I tried installing stable ppa and 7.0 version instead of 7.2, but I couldn't even access the add-ons database this time. I'm running out of ideas and competences... – Nat Azodnem Nov 15 '17 at 16:50
  • @NatAzodnem may be you could try removing libq5 package reinstalling it. – Abel Tom Nov 15 '17 at 19:03
0

So, I stumbled upon this thread and I managed to install grass-dev with sudo aptitude install grass-dev.

Not really sure what the aptitude command does but it worked! I had to go through multiple options as to which solution I wanted to apply for the missing dependencies, and I chose one that installed libgdal-dev and libpq-dev. Libpq5 and other packages were downgraded. For what purpose I dont' know, but hey it works now :-D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.