[R] installing R on Ubuntu
edd at debian.org
Sun Feb 8 22:28:27 CET 2009
On 8 February 2009 at 12:14, Paul Heinrich Dietrich wrote:
| Hi Dirk,
| Sorry, I'm not trying to drag out the installation process here, but just
| trying to get it to work right in Linux.
| Dirk Eddelbuettel wrote:
| > What is wrong with
| > $ sudo apt-get install r-cran-rgl
| I tried this suggestion, and here was the terminal output:
| r-cran-rgl is already the newest version.
| r-cran-rgl set to manually installed.
| 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Good. You were supposed to stop here :)
| So, just to double-check, I went into R as sudo, entered update.packages(),
| and got this:
| rgl :
| Version 0.76 installed in /usr/lib/R/site-library
| Version 0.82 available at http://streaming.stat.iastate.edu/CRAN
You are confusing
a) having a _pre-compiled binary_ installed (0.76)
===> this implies only libraries for running this
b) having the ability to _locally compile_
===> this requires matching header files etc provided by the -dev
And a) != b). We provide a) because b) is harder as you discover below.
Unless you are reasonably experienced with your Linux distro of choice it is
somewhat difficult to build certain packages, especially when they have
Which is _precisely_ why we provide the binaries.
Now, a good compromise is to look at the _source of pre-built package_ as
this contains the Debian/Ubuntu-specific knowledge that the generic source
does not have. In particular:
Build-Depends: debhelper (>= 5.0.0), r-base-dev (>= 2.8.1), cdbs, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libpng12-dev, libx11-dev, libxt-dev, x11proto-core-dev
leading to install
libgl1-mesa-dev or libgl-dev
libglu1-mesa-dev or libglu-dev
after which your local build will probably succeed.
There is nice way to semi-automate this, and we need to document it
better. It is somewhat more advanced though.
| ...and later this...
| * Installing *source* package 'rgl' ...
| checking for gcc... gcc -std=gnu99
| checking for C compiler default output file name... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables...
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc -std=gnu99 accepts -g... yes
| checking for gcc -std=gnu99 option to accept ISO C89... none needed
| checking how to run the C preprocessor... gcc -std=gnu99 -E
| checking for gcc... (cached) gcc -std=gnu99
| checking whether we are using the GNU C compiler... (cached) yes
| checking whether gcc -std=gnu99 accepts -g... (cached) yes
| checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
| checking for libpng-config... no
| checking libpng... checking for grep that handles long lines and -e...
| checking for egrep... /bin/grep -E
| checking for ANSI C header files... yes
| checking for sys/types.h... yes
| checking for sys/stat.h... yes
| checking for stdlib.h... yes
| checking for string.h... yes
| checking for memory.h... yes
| checking for strings.h... yes
| checking for inttypes.h... yes
| checking for stdint.h... yes
| checking for unistd.h... yes
| checking png.h usability... no
| checking png.h presence... no
| checking for png.h... no
| checking for png_read_update_info in -lpng... no
| configure: libpng header and lib found
| configure: using libpng dynamic linkage
| checking for X... no
| configure: error: X11 not found but required, configure aborted.
| ERROR: configuration failed for package 'rgl'
| ** Removing '/usr/lib/R/site-library/rgl'
| ** Restoring previous '/usr/lib/R/site-library/rgl'
| The downloaded packages are in
| Warning message:
| In install.packages(update[instlib == l, "Package"], l, contriburl =
| contriburl, :
| installation of package 'rgl' had non-zero exit status
| View this message in context: http://www.nabble.com/installing-R-on-Ubuntu-tp10025949p21902802.html
| Sent from the R help mailing list archive at Nabble.com.
| R-help at r-project.org mailing list
| PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
| and provide commented, minimal, self-contained, reproducible code.
Three out of two people have difficulties with fractions.
More information about the R-help