[R] R Compilation error on Ubuntu

Satoshi Takahama brown_emu at yahoo.com
Tue Dec 25 10:35:19 CET 2007

Hi Taka,

I was just trying to do this yesterday and ran into the same problem (compiling R 2.6.1 on Gutsy Gibbon). Apparently this happens on Debian/Ubuntu distributions because the developer install is separate from the user install.

Basically, to address the configure error:

"--with-readline=yes (default) and headers/libs are not available"

you need the development version of readline:
  sudo apt-get install libreadline5-dev
(see http://cran.r-project.org/doc/manuals/R-admin.html)

Later, I ran into another configure error:
"--with-x=yes (default) and X11 headers/libs are not available"
so I installed xorg-dev:
  sudo apt-get install xorg-dev
(see http://tolstoy.newcastle.edu.au/R/e2/help/06/11/5193.html)

At the end, I also got a configure WARNING:
"you cannot build info or HTML versions of the R manuals "
so then I installed texinfo:
  sudo apt-get install texinfo
(see http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15498.html)

Hope this helps,


----- Original Message ----
From: Takatsugu Kobayashi <tkobayas at indiana.edu>
To: r-help at stat.math.ethz.ch
Sent: Monday, December 24, 2007 10:52:11 AM
Subject: Re: [R] R Compilation error on Ubuntu


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
--- 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
Warning message:
installation of package 'sp' had non-zero exit status in:

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

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

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
a link using 'ln -s'? 

I appreciate your help.

[[replacing trailing spam]]


R-help at r-project.org mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Never miss a thing.  Make Yahoo your home page.

More information about the R-help mailing list