[GRASS-stats] problem installing spgrass6 in R
Roger Bivand
Roger.Bivand at nhh.no
Mon Sep 28 14:54:05 EDT 2009
On Mon, 28 Sep 2009, Tim Holland wrote:
>
> Dear all,
>
> I am trying to install spgrass6 in R, but am having trouble. I have seen a
> previous related post
> (http://n2.nabble.com/GRASS-stats-Problems-installing-spgrass6-td1930684.html#a1930684),
> but I believe this is a different issue as I get different error messages.
>
> I am installing using the command
>> install.packages("spgrass6", type="source", dependencies=TRUE)
>
> On MacOSX 10.5.8, with sessionInfo() details as follows:
>
> R version 2.9.2 (2009-08-24)
> i386-apple-darwin8.11.1
> locale:
> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> loaded via a namespace (and not attached):
> [1] tools_2.9.2
>
> I think I have the GDAL libraries installed, as I believe they are required
> for GRASS, which I have and which is running fine (version 6.4). It seems
> like the most likely problem (based on error messages) is not having an
> acceptable C compiler? If that is the issue, any guidance on how to find
> and install one would be very appreciated.
Check that you do have a visible GDAL install, as well as PROJ.4. Don't
assume, it usually hurts. Until gdal-config is found, you will not make
any progress. spgrass6 does not need a C/C++ compiler (but what reasonable
Unix lacks a compiler?)
You need XML (but not bitops) and sp, which you can install as binaries,
then you need rgdal installed from source or from
http://www.kyngchaos.com/software:frameworks
Check your GRASS installation for its GDAL/PROJ.4, you do not want
clashing versions. Start from the beginning (PROJ.4, GDAL), and build from
there (rgdal, GRASS), to be sure that they match.
Hope this helps,
Roger
>
> Thank you for any help on this. The error messages I get are below (sorry
> for so much text).
>
> Best,
> Tim
>
>
>
> * Installing *source* package ‘bitops’ ...
> ** libs
> ** arch - i386
> sh: make: command not found
> ERROR: compilation failed for package ‘bitops’
> * Removing
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/bitops’
> * Installing *source* package ‘sp’ ...
> ** libs
> ** arch - i386
> sh: make: command not found
> ERROR: compilation failed for package ‘sp’
> * Removing
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/sp’
> * Installing *source* package ‘XML’ ...
> checking for gcc... no
> checking for cc... no
> checking for cc... no
> checking for cl... no
> configure: error: no acceptable C compiler found in $PATH
> See `config.log' for more details.
> ERROR: configuration failed for package ‘XML’
> * Removing
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/XML’
> * Installing *source* package ‘rgdal’ ...
> gdal-config: gdal-config
> ./configure: line 1311: gdal-config: command not found
> 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 'sp' 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 'bitops' had non-zero exit status
> 2: In install.packages("spgrass6", type = "source", dependencies = TRUE) :
> installation of package 'sp' had non-zero exit status
> 3: In install.packages("spgrass6", type = "source", dependencies = TRUE) :
> installation of package 'XML' had non-zero exit status
> 4: In install.packages("spgrass6", type = "source", dependencies = TRUE) :
> installation of package 'rgdal' had non-zero exit status
> 5: 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