Re: [R] R Compilation error on Ubuntu

From: Paul Gilbert <pgilbert_at_bank-banque-canada.ca>
Date: Mon, 24 Dec 2007 15:22:41 -0500

Taka

You might want to try R-SIG-Debian for this kind of question. Here are instructions from Dirk in response to my similar question a few days ago.

HTH,
Paul


On 12 December 2007 at 18:17, Paul Gilbert wrote: | I'm trying to build R from source on Ubuntu Gutsy Gibbon. I've done | apt-get install r-base-dev and apt-get libX11-dev, but R configure is

You're close: 'r-base-dev' gives you (about) everything to run 'install.package()' once you have R; libX11-dev ought to give you everything but somehow doesn't so ...

| still complaining about X11 headers/libs are not available. What else | do I need?

... use the 'apt-get build-dep $package' command, ie

        $ sudo apt-get build-dep r-base

which will pull in this list (as per the current Debian unstable package):

Build-Depends: gcc (>= 4:4.1.0), g++ (>= 4:4.1.0), gfortran (>= 4:4.1.0), refblas3-dev | atlas3-base-dev, tcl8.4-dev, tk8.4-dev, bison, groff-base, libncurses5-dev, libreadline5-dev, debhelper (>= 5.0.0), texi2html, texinfo (>= 4.1-2), libbz2-dev, libpcre3-dev, tetex-bin, tetex-extra, xpdf-reader, zlib1g-dev, libpng12-dev, libjpeg62-dev, libx11-dev, libxt-dev, x-dev

So in this particular case, libxt-dev and x-dev were still missing.

'apt-get build-dep $foo' is really convenient. Try 'apt-get source $foo' as well to get sources (if you have entries like

        deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free

I use that all the time to fetch Debian sources onto Ubuntu machines at work. It may at times conflict with what packages Ubuntu has, or what names they used -- but for R and one or two dozen other Debian packages it has always been useful for me on Ubuntu too.

Cheers, Dirk

Takatsugu Kobayashi wrote:
> 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
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


La version franšaise suit le texte anglais.


This email may contain privileged and/or confidential in...{{dropped:26}}



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 24 Dec 2007 - 20:26:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 24 Dec 2007 - 22:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.