[Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

5 messages Options
Embed this post
Permalink
Agustin Lobo

[Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

Reply Threaded More More options
Print post
Permalink
Any further help on this list?
Agus
-------- Original Message --------
Subject: Re: [R-sig-Geo] Errror with gmeta6()
Date: Wed, 9 Sep 2009 13:35:55 +0200 (CEST)
From: Roger Bivand <[hidden email]>
Reply-To: [hidden email]
To: [hidden email]
CC: sig-geo <[hidden email]>
References: <[hidden email]>

On Wed, 9 Sep 2009, Agustin Lobo wrote:

> Hi!
>
> I've started spgrass6() with no problems
> (I get:
> GRASS GIS interface loaded with GRASS version: 6.4.0RC4
> and location: carlos
>
> but then get an error with gmeta6:
>
>> gmeta6()
> g.region: error while loading shared libraries: libgrass_vect.so: cannot open
> shared object file: No such file or directory
> Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==  :
> argument is of length zero
> Error in parseGRASS(cmd) : g.region not parsed
>
> I'm using R  2.9.1 on ubuntu jaunty and just
> made install.packages("spgrass6")
>
> g.region -p  works fine in the grass console, but
>> system("g.region -p")
> g.region: error while loading shared libraries: libgrass_vect.so: cannot open
> shared object file: No such file or directory
This will be a "dependency hell" problem between GDAL and GRASS binaries,
probably a stale GRASS GDAL plugin somewhere. It has been seen on Debian
based distributions before, for example:

http://lists.osgeo.org/pipermail/grass-stats/2009-July/001105.html

Most likely you have multiple GDAL and/or GDAL binaries that do not like
each other, and because of the possible reverse dependence in the GDAL
GRASS plugin, they get in each others' way. The grass-stats list may be a
good place to ask too.

Roger

>
> Any idea on how to fix this problem?
> Thanks
> Agus
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]



[alobolistas.vcf]

begin:vcard
fn:Agustin Lobo
n:Lobo;Agustin
org:Institut de Ciencies de la Terra "Jaume Almera" CSIC
adr:;;Lluis Sole Sabris s/n;Barcelona;;08028;Spain
email;internet:[hidden email]
url:http://www.ija.csic.es/gt/obster
version:2.1
end:vcard



_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler

Re: [Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

Reply Threaded More More options
Print post
Permalink
2009/9/9 Agustin Lobo <[hidden email]>:

> Any further help on this list?
> Agus
> On Wed, 9 Sep 2009, Agustin Lobo wrote:
>
>> Hi!
>>
>> I've started spgrass6() with no problems
>> (I get:
>> GRASS GIS interface loaded with GRASS version: 6.4.0RC4
>> and location: carlos
>>
>> but then get an error with gmeta6:
>>
>>> gmeta6()
>>
>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>> open shared object file: No such file or directory
>> Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==
>>  :
>> argument is of length zero
>> Error in parseGRASS(cmd) : g.region not parsed
>>
>> I'm using R  2.9.1 on ubuntu jaunty and just
>> made install.packages("spgrass6")
>>
>> g.region -p  works fine in the grass console, but
>> > system("g.region -p")
>>
>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>> open shared object file: No such file or directory
>
> This will be a "dependency hell" problem between GDAL and GRASS binaries,

I suspect that instead the LD link to the GRASS libraries is missing. I have
a file (create as root):

# something like this (adapt path):
cat /etc/ld.so.conf.d/grass.conf
/usr/local/grass640/dist.x86_64-unknown-linux-gnu/lib

The program "ldconfig" needs to be run afterwards.

Hope this helps
Markus
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Agustin Lobo

Re: [Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

Reply Threaded More More options
Print post
Permalink
I've upgraded to qgis 1.2.0-2~jaunty1build1
and ligdal1-1.6.0-grass 1.6.0-3~jaunty1
and everything seems to work fine regarding the qgis grass link.

Regarding R - grass:
If I :
1. start qgis
2. start qgis grass plugin
3. open mapset
4.open maptools
5.open grass shell
6. start R
7. require(spgrass6)
8.gmeta6() works fine

but if I
5. open grass shell
5a. open en xterm &  (as I've always done, so that I keep an open grass
console)
6 start R in the new xterm
7. require(spgrass6) works fine (and notifies the mapset)
8. gmeta6() does not work:
 > gmeta6()
g.region: error while loading shared libraries: libgrass_vect.so: cannot
open shared object file: No such file or directory
Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText
==  :
  argument is of length zero
Error in parseGRASS(cmd) : g.region not parsed

It might be a different behavior of ubuntu jaunty at opening new xterm
consoles?

Agus

Markus Neteler wrote:

> 2009/9/9 Agustin Lobo <[hidden email]>:
>  
>> Any further help on this list?
>> Agus
>> On Wed, 9 Sep 2009, Agustin Lobo wrote:
>>
>>    
>>> Hi!
>>>
>>> I've started spgrass6() with no problems
>>> (I get:
>>> GRASS GIS interface loaded with GRASS version: 6.4.0RC4
>>> and location: carlos
>>>
>>> but then get an error with gmeta6:
>>>
>>>      
>>>> gmeta6()
>>>>        
>>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>>> open shared object file: No such file or directory
>>> Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==
>>>  :
>>> argument is of length zero
>>> Error in parseGRASS(cmd) : g.region not parsed
>>>
>>> I'm using R  2.9.1 on ubuntu jaunty and just
>>> made install.packages("spgrass6")
>>>
>>> g.region -p  works fine in the grass console, but
>>>      
>>>> system("g.region -p")
>>>>        
>>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>>> open shared object file: No such file or directory
>>>      
>> This will be a "dependency hell" problem between GDAL and GRASS binaries,
>>    
>
> I suspect that instead the LD link to the GRASS libraries is missing. I have
> a file (create as root):
>
> # something like this (adapt path):
> cat /etc/ld.so.conf.d/grass.conf
> /usr/local/grass640/dist.x86_64-unknown-linux-gnu/lib
>
> The program "ldconfig" needs to be run afterwards.
>
> Hope this helps
> Markus
> _______________________________________________
> grass-stats mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>
>  

[alobolistas.vcf]

begin:vcard
fn:Agustin Lobo
n:Lobo;Agustin
org:Institut de Ciencies de la Terra "Jaume Almera" CSIC
adr:;;Lluis Sole Sabris s/n;Barcelona;;08028;Spain
email;internet:[hidden email]
url:http://www.ija.csic.es/gt/obster
version:2.1
end:vcard



_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Agustin Lobo

Re: [Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

Reply Threaded More More options
Print post
Permalink
In reply to this post by Markus Neteler
Markus,

gemeta6() works fine from any xterm console created
from the grass console after changing
/usr/lib/grass/lib
to
/usr/lib/grass64/lib

in grass.conf
as you suggested.

I don't remember having made grass.conf though, is there any way
for the installation to actually take place of this change of
the grass directory name?

Thanks!

Agus

Markus Neteler wrote:

> 2009/9/9 Agustin Lobo <[hidden email]>:
>> Any further help on this list?
>> Agus
>> On Wed, 9 Sep 2009, Agustin Lobo wrote:
>>
>>> Hi!
>>>
>>> I've started spgrass6() with no problems
>>> (I get:
>>> GRASS GIS interface loaded with GRASS version: 6.4.0RC4
>>> and location: carlos
>>>
>>> but then get an error with gmeta6:
>>>
>>>> gmeta6()
>>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>>> open shared object file: No such file or directory
>>> Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==
>>>  :
>>> argument is of length zero
>>> Error in parseGRASS(cmd) : g.region not parsed
>>>
>>> I'm using R  2.9.1 on ubuntu jaunty and just
>>> made install.packages("spgrass6")
>>>
>>> g.region -p  works fine in the grass console, but
>>>> system("g.region -p")
>>> g.region: error while loading shared libraries: libgrass_vect.so: cannot
>>> open shared object file: No such file or directory
>> This will be a "dependency hell" problem between GDAL and GRASS binaries,
>
> I suspect that instead the LD link to the GRASS libraries is missing. I have
> a file (create as root):
>
> # something like this (adapt path):
> cat /etc/ld.so.conf.d/grass.conf
> /usr/local/grass640/dist.x86_64-unknown-linux-gnu/lib
>
> The program "ldconfig" needs to be run afterwards.
>
> Hope this helps
> Markus
>

[alobolistas.vcf]

begin:vcard
fn:Agustin Lobo
n:Lobo;Agustin
org:Institut de Ciencies de la Terra "Jaume Almera" CSIC
adr:;;Lluis Sole Sabris s/n;Barcelona;;08028;Spain
email;internet:[hidden email]
url:http://www.ija.csic.es/gt/obster
version:2.1
end:vcard



_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler

Re: [Fwd: Re: [R-sig-Geo] Errror with gmeta6()]

Reply Threaded More More options
Print post
Permalink
On Sun, Sep 13, 2009 at 10:02 PM, Agustin Lobo <[hidden email]> wrote:

> Markus,
>
> gemeta6() works fine from any xterm console created
> from the grass console after changing
> /usr/lib/grass/lib
> to
> /usr/lib/grass64/lib
>
> in grass.conf
> as you suggested.

Excellent!

> I don't remember having made grass.conf though, is there any way
> for the installation to actually take place of this change of
> the grass directory name?

Indeed it is the job of the package manager which installs the
GRASS-GDAL plugin (or whereever this should happen). If needed,
please file a bug there in case it is missing on Ubuntu.

Glad to know it solved for now,
Markus
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats