【发布时间】:2020-02-06 13:42:25
【问题描述】:
在 Ubuntu 16.04 上将 R 升级到 3.6.2(从 3.4)后,由于(至少一个)依赖项 (nloptr) 也无法安装,我无法安装“汽车”包。这似乎是 C++ 编译器的问题(它使用了一些已弃用的“配置”设置,但我在试图解决这个问题时迷路了)。
我在 R 中(从终端)调用了以下命令:
install.packages("nloptr")
错误信息:
Installing package into ‘/home/heike/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://ftp.fau.de/cran/src/contrib/nloptr_1.2.1.tar.gz'
Content type 'application/x-gzip' length 2448313 bytes (2.3 MB)
==================================================
downloaded 2.3 MB
* installing source package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
** using staged installation
'config' variable 'CPP' is deprecated
'config' variable 'CXXCPP' is deprecated
checking whether the C++ compiler works... no
configure: error: in /tmp/RtmpPLaJFA/R.INSTALL5e5ed06eeac/nloptr': configure: error: C++ compiler cannot create executables See config.log' for more details
ERROR: configuration failed for package ‘nloptr’
目前采取的步骤
- 更改了 CRAN 镜像和 source.list 条目
- 卸载并重新安装 R 3.6.2(也在不同的机器上),同样的问题仍然存在
系统信息
- 操作系统版本:Ubuntu 16.04 (x86_64-pc-linux-gnu (64-bit))
- R 版本:3.6.2 (2019-12-12)
【问题讨论】:
-
config.log的内容是什么? -
我不知道在哪里可以找到 config.log - 它没有给我目录。 >> find -iname config.log 查找许多与 R 无关的日志文件。