【发布时间】:2012-08-22 17:08:31
【问题描述】:
我正在尝试在我的 Ubuntu 12.04 桌面上安装 R 库 BRugs。
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
但我收到以下错误:
* 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’
这是config.log 的链接。很难判断错误是什么,除了错误以gcc: error: unrecognized option '-V'开头。
我怎样才能绕过这个错误(并安装 BRugs)?
【问题讨论】:
-
1) 可能在
/tmp/RtmpnNLTG1/R.INSTALL488b7635d4c0/BRugs。 2) 您是否按照 Writing R Extensions 的Chapter 1: Creating R packages 中的说明进行操作? -
@JoshuaUlrich 1)
/tmp/RtmpnNLTG1/不存在 2) 我现在正在这样做。 -
如果您之前没有安装 BRugs,请在您的 shell 中尝试
sudo apt-get install build-essential。也许这会安装任何缺少的依赖项。 -
@halex 我已经有了
build-essential包 -
@David:我参考的第 3 段引用了 R 安装和管理;请务必阅读该手册的Appendix A。
标签: c r gcc compiler-construction