rcgcc

error installing BRugs "C compiler cannot create executables"


I am trying to install the R library BRugs on my Ubuntu 12.04 desktop.

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)

But I get the following error:

* installing *source* package ‘BRugs’ ...
** package ‘BRugs’ successfully unpacked and MD5 sums checked
checking for prefix by checking for OpenBUGS... /usr/bin/OpenBUGS
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/RtmpnNLTG1/R.INSTALL488b7635d4c0/BRugs':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘BRugs’
* removing ‘/home/myuser/lib/R/BRugs’
Warning in install.packages("BRugs") :
  installation of package ‘BRugs’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp2ytOWn/downloaded_packages’

Here is a link to config.log. It is difficult to tell what the error is, except that the errors starts with gcc: error: unrecognized option '-V'.

How can I get around this error (and install BRugs)?


Solution

  • According to the package description:

    Versions running on Linux and on 64-bit R under Windows are in "beta" status and less efficient.

    And it looks like configure is trying to build the package using 32-bit executables (note the -m32 flags). It's probably best if you contact the package maintainer(s) and ask them how to build the 32-bit executable under 64-bit Ubuntu.