[R] R Compilation error on Ubuntu

Takatsugu Kobayashi tkobayas at indiana.edu
Mon Dec 24 19:52:11 CET 2007


Hi

I bought a new laptop HP dv9500 just a week ago and installed a Ubuntu
gutsy ribbon on this laptop. I wanted to install Fedora but there are
more threads on Ubuntu, so I decided to install Ubuntu. After hours of
struggle in configuring x server/graphic card stuff, I installed R for
Gutsy ribbon using "sudo apt-get install g77 r-core'. 

Now when I tried to install 'sp' package I got this error message: 

Warning in install.packages("sp") : argument 'lib' is missing: using
'/usr/local/lib/R/site-library'
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://cran.mtu.edu/src/contrib/sp_0.9-17.tar.gz'
Content type 'application/x-gzip' length 359194 bytes
opened URL
==================================================
downloaded 350Kb

* Installing *source* package 'sp' ...
** libs
gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include
-fpic  -g -O2 -c gcdist.c -o gcdist.o
/bin/bash: gcc-4.2: command not found
make: *** [gcdist.o] Error 127
ERROR: compilation failed for package 'sp'
** Removing '/usr/local/lib/R/site-library/sp'

The downloaded packages are in
        /tmp/RtmpfOk3H7/downloaded_packages
Warning message:
installation of package 'sp' had non-zero exit status in:
install.packages("sp") 

Then, I removed this gutsy ribbon version of R and attempted to install
fresh R-2.6.1.tar.gz. When I tried to build it, I got this error
message:

configure: error: --with-readline=yes (default) and headers/libs are not
available

I installed xserver-xorg-dev ok. 

I am using Fedora 6 on my desktop and have never seen these above error
messages. Should I install a Fedora and R on it? Or should I just create
a link using 'ln -s'? 

I appreciate your help.

Have a festive holiday!

taka



More information about the R-help mailing list