Hello everybody!<br><br>I am using GRASS 6.4.0 RC6 in ubuntu 10.04. I installed R version 2.11.1 (2010-05-31) just today. As I need GRASS and R interface for my work, I went ahead as per instructions in <a href="http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-R.pdf">http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-R.pdf</a>. <br>
<br>Initially when I started R from within GRASS and tried the command I got the following errors:<br><div style="margin-left: 40px;">> install.packages("spgrass6", dependencies = TRUE)<br>Warning in install.packages("spgrass6", dependencies = TRUE) :<br>
argument 'lib' is missing: using '/usr/local/lib/R/site-library'<br>Warning in install.packages("spgrass6", dependencies = TRUE) :<br> 'lib = "/usr/local/lib/R/site-library"' is not writable<br>
Would you like to create a personal library<br>'~/R/i486-pc-linux-gnu-library/2.11'<br>to install packages into? (y/n) n<br>Error in install.packages("spgrass6", dependencies = TRUE) : <br> unable to install packages<br>
> q()<br><br></div>Later I started R using "sudo R" and then the following errors and warnings occurred. <br><div style="margin-left: 40px;">> install.packages("spgrass6", dependencies = TRUE)<br>
Warning in install.packages("spgrass6", dependencies = TRUE) :<br> argument 'lib' is missing: using '/usr/local/lib/R/site-library'<br>--- Please select a CRAN mirror for use in this session ---<br>
Loading Tcl/Tk interface ... done<br>also installing the dependencies ‘rgdal’, ‘XML’<br><br>trying URL '<a href="http://mirror.kapook.com/cran/src/contrib/rgdal_0.6-28.tar.gz">http://mirror.kapook.com/cran/src/contrib/rgdal_0.6-28.tar.gz</a>'<br>
Content type 'application/x-gzip' length 1416605 bytes (1.4 Mb)<br>opened URL<br>==================================================<br>downloaded 1.4 Mb<br><br>trying URL '<a href="http://mirror.kapook.com/cran/src/contrib/XML_3.1-1.tar.gz">http://mirror.kapook.com/cran/src/contrib/XML_3.1-1.tar.gz</a>'<br>
Content type 'application/x-gzip' length 779143 bytes (760 Kb)<br>opened URL<br>==================================================<br>downloaded 760 Kb<br><br>trying URL '<a href="http://mirror.kapook.com/cran/src/contrib/spgrass6_0.6-20.tar.gz">http://mirror.kapook.com/cran/src/contrib/spgrass6_0.6-20.tar.gz</a>'<br>
Content type 'application/x-gzip' length 334459 bytes (326 Kb)<br>opened URL<br>==================================================<br>downloaded 326 Kb<br><br>* installing *source* package ‘rgdal’ ...<br>gdal-config: gdal-config<br>
./configure: line 1311: gdal-config: command not found<br>Error: gdal-config not found<br>The gdal-config script distributed with GDAL could not be found.<br>If you have not installed the GDAL libraries, you can<br>download the source from <a href="http://www.gdal.org/">http://www.gdal.org/</a><br>
If you have installed the GDAL libraries, then make sure that<br>gdal-config is in your path. Try typing gdal-config at a<br>shell prompt and see if it runs. If not, use:<br> --configure-args='--with-gdal-config=/usr/local/bin/gdal-config' echo with appropriate values for your installation.<br>
<br>ERROR: configuration failed for package ‘rgdal’<br>* removing ‘/usr/local/lib/R/site-library/rgdal’<br>* installing *source* package ‘XML’ ...<br>checking for gcc... gcc<br>checking for C compiler default output file name... a.out<br>
checking whether the C compiler works... yes<br>checking whether we are cross compiling... no<br>checking for suffix of executables... <br>checking for suffix of object files... o<br>checking whether we are using the GNU C compiler... yes<br>
checking whether gcc accepts -g... yes<br>checking for gcc option to accept ISO C89... none needed<br>checking how to run the C preprocessor... gcc -E<br>checking for sed... /bin/sed<br>checking for pkg-config... /usr/bin/pkg-config<br>
checking for xml2-config... no<br>Cannot find xml2-config<br>ERROR: configuration failed for package ‘XML’<br>* removing ‘/usr/local/lib/R/site-library/XML’<br>ERROR: dependencies ‘rgdal’, ‘XML’ are not available for package ‘spgrass6’<br>
* removing ‘/usr/local/lib/R/site-library/spgrass6’<br><br>The downloaded packages are in<br> ‘/tmp/RtmpP2fUan/downloaded_packages’<br>Warning messages:<br>1: In install.packages("spgrass6", dependencies = TRUE) :<br>
installation of package 'rgdal' had non-zero exit status<br>2: In install.packages("spgrass6", dependencies = TRUE) :<br> installation of package 'XML' had non-zero exit status<br>3: In install.packages("spgrass6", dependencies = TRUE) :<br>
installation of package 'spgrass6' had non-zero exit status<br><br></div>The result is I am not able to use spgrass.<br><div style="margin-left: 40px;">> library(spgrass6)<br>Error in library(spgrass6) : there is no package called 'spgrass6' <br>
</div><br>As an intermediate level user in terms of commands and also regarding R and GRASS packages I am not able to decide what went wrong. Can you please help me out.<br><br>Regards,<br><br>Chethan S.<br>