【发布时间】:2015-07-06 15:18:57
【问题描述】:
我在 Heroku 实例上安装 R 包 expm 时遇到问题。
我收到以下错误:
* installing *source* package ‘expm’ ...
** package ‘expm’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/app/vendor/R/lib/R/include -DNDEBUG -I/usr/local/include -fpic -g -O2 -c R_dgebal.c -o R_dgebal.o
In file included from locale.h:4:0,
from expm.h:10,
from R_dgebal.c:4:
R_dgebal.c: In function ‘ebal_type’:
locale.h:5:19: error: ‘LC_MESSAGES’ undeclared (first use in this function)
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:11:8: note: in expansion of macro ‘_’
error(_("argument type='%s' must be a character string of string length 1"),
^
locale.h:5:19: note: each undeclared identifier is reported only once for each function it appears in
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:11:8: note: in expansion of macro ‘_’
error(_("argument type='%s' must be a character string of string length 1"),
^
R_dgebal.c: In function ‘R_dgebal’:
locale.h:5:19: error: ‘LC_MESSAGES’ undeclared (first use in this function)
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:28:8: note: in expansion of macro ‘_’
error(_("invalid 'x': not a numeric (classical R) matrix"));
^
make: *** [R_dgebal.o] Error 1
ERROR: compilation failed for package ‘expm’
* removing ‘/app/vendor/R/lib/R/library/expm’
ERROR: dependency ‘expm’ is not available for package ‘msm’
* removing ‘/app/vendor/R/lib/R/library/msm’
ERROR: dependency ‘msm’ is not available for package ‘ltm’
* removing ‘/app/vendor/R/lib/R/library/ltm’
我正在使用 R buildpack,但不确定是什么导致了错误。
谢谢!
我打算安装一个朋友写的R包,但是它所依赖的包expm不会安装。
来自 sessionInfo():
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
buildpack 使用此脚本安装 R:https://github.com/virtualstaticvoid/heroku-buildpack-r/blob/master/support/build-r
【问题讨论】:
-
在我看来,说您“使用 R buildpack”太含糊,无法支持很多建议。
-
看起来您只是缺少一些需要先安装的依赖项
-
关于哪些依赖项或如何在 Heroku 实例上安装它们的任何建议?
-
那个“R build pack”似乎只安装了一个包。它也不包含有关 R 版本的信息。您应该发布 R 安装方式的详细信息、从 R 命令提示符运行的
sessionInfo()的输出,以及您打算安装的软件包的完整详细信息。安装在您的R的实例