[GRASS-stats] problem installing spgrass6 in R
Roger Bivand
Roger.Bivand at nhh.no
Wed Sep 30 05:05:37 EDT 2009
On Tue, 29 Sep 2009, Tim Holland wrote:
>
>
>
> Hamish wrote:
>>
>>
>>> you need to install 'make' which comes with gcc etc. from the
>>> Xcode(?) installer.
>>
>>
>
>
> Roger Bivand wrote:
>>
>>
>> I think Tim needs to read the available FAQs on CRAN, and read:
>>
>> http://r.research.att.com/tools/
>>
>> giving the recipes for setting up an OSX system for building R packages.
>> It isn't hard, one just needs to folloow the instructions and *never*
>> assume anything unless one knows more about OSX variants than the
>> maintainer. I think that the underlying GRASS install is broken too
>> (probably PATH problems) wrt. GDAL.
>>
>>
>
>
> Dear all,
>
> Thank you for the help, Hamish and Roger (on list and off). I was missing
> Xcode as you suggested Hamish, so now that is installed and I got marginally
> further on the install: rgdal and spgrass6 still failed, but bitops, XML,
> and sp worked.
>
> I am still not sure how to test if my gdal install is broken or not, but I
> will follow Roger's advice and assume that is is, and reinstall everything
> from the ground up. I tried running gdal-config in GRASS, and got the
> following output - so I think it is installed, put perhaps with PATH
> problems.
>
> GRASS 6.4.0RC4 (mapset):~ > gdal-config
> Usage: gdal-config [OPTIONS]
> Options:
> [--prefix[=DIR]]
> [--libs]
> [--dep-libs]
> [--cflags]
> [--datadir]
> [--version]
> [--ogr-enabled]
> [--formats]
>
> Thanks again for the help. The error messages I'm getting now are below. I
> am mainly just writing here as an update for the info of the list (and
> newbies such as myself getting stuck on this in future), so unless it seems
> like a bad idea (in which case please correct me) I will just do the
> strategy of reinstalling everything.
Tim,
One way of handling this might be - if you will only use rgdal from
"within" GRASS, is to run the install from the rgdal source package in
that environment. Alternatively, use gdal-config within GRASS to find the
the GDAL libs (--libs) and headers (--cflags) strings to pass to the
configure arguments in install.packages() in R outside GRASS. Here rgdal
will fail after installation if the GDAL shared objects are not on the
PATH R can see.
Hope this helps,
Roger
>
> Best,
> Tim
>
>
>
> (part of) error transcript from R (having run install.packages("spgrass6",
> type="source", dependencies=TRUE)):
>
> Error: gdal-config not found
> The gdal-config script distributed with GDAL could not be found.
> If you have not installed the GDAL libraries, you can
> download the source from http://www.gdal.org/
> If you have installed the GDAL libraries, then make sure that
> gdal-config is in your path. Try typing gdal-config at a
> shell prompt and see if it runs. If not, use:
> --configure-args='--with-gdal-config=/usr/local/bin/gdal-config' echo with
> appropriate values for your installation.
>
> ERROR: configuration failed for package ‘rgdal’
> * Removing
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/rgdal’
> * Installing *source* package ‘spgrass6’ ...
> ** R
> ** inst
> ** preparing package for lazy loading
> Error : package 'rgdal' required by 'spgrass6' could not be found
> ERROR: lazy loading failed for package ‘spgrass6’
> * Removing
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/spgrass6’
>
> The downloaded packages are in
>
> ‘/private/var/folders/nX/nX5WzHJNHoC9btpEipD-dU+++TM/-Tmp-/RtmplsIEHV/downloaded_packages’
> Updating HTML index of packages in '.Library'
> Warning messages:
> 1: In install.packages("spgrass6", type = "source", dependencies = TRUE) :
> installation of package 'rgdal' had non-zero exit status
> 2: In install.packages("spgrass6", type = "source", dependencies = TRUE) :
> installation of package 'spgrass6' had non-zero exit status
>
--
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: Roger.Bivand at nhh.no
More information about the grass-stats
mailing list