【问题标题】:error installing BRugs "C compiler cannot create executables"安装 BRugs 时出错“C 编译器无法创建可执行文件”
【发布时间】: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 ExtensionsChapter 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


【解决方案1】:

根据包装说明:

在 Linux 和 Windows 下的 64 位 R 上运行的版本处于“测试版” 状态和效率较低。

看起来configure 正在尝试使用 32 位可执行文件构建包(注意-m32 标志)。最好联系软件包维护者并询问他们如何在 64 位 Ubuntu 下构建 32 位可执行文件。

【讨论】:

  • 谢谢。虽然这并不能解决我的问题,但我们在 cmets 中关于从源代码构建的讨论对我来说是一次很好的学习经历。我很高兴使用 JAGS,但只是想使用 BRugs 来帮助解决我的核心问题,即尝试将 rjags 生成的 mcmc.list 转换为我在 this sitestats.se 上的帖子中描述的 rbugs 生成的 coda 对象,尽管每个人都有赏金,但仍未得到答复。
猜你喜欢
  • 1970-01-01
  • 2013-09-23
  • 2021-12-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-04-12
  • 2021-06-28
  • 1970-01-01
相关资源
最近更新 更多