在 Heroku 上安装 R 包 expm
Installing R package expm on Heroku
我在我的 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
您可以尝试包含二进制而不是 here。 msm
软件包似乎以二进制形式提供。
heroku 构建包中存在错误,已修复。
出于不同的原因,我遇到了同样的错误。
expm
附带一个 expm/src/locale.h
文件,该文件包含在 expm.h
中,并使包包含 <libintl.h>
如果它存在(在一个简单的系统上这将可能指向 /usr/include/libintl.h
),这将依次包含 C 库的标准 locale.h
(例如 /usr/include/locale.h
)。
但是我的 $CPATH
环境变量有一个尾随的 :
(它不应该)导致当前目录(在本例中为 expm/src/
)在搜索路径中<...>
包括。因此 libintl.h
循环回到 expm/src/locale.h
并且标准库 locale.h
实际上并没有被包含在内。
解决方案是修复我的 $CPATH
。
我在我的 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
您可以尝试包含二进制而不是 here。 msm
软件包似乎以二进制形式提供。
heroku 构建包中存在错误,已修复。
出于不同的原因,我遇到了同样的错误。
expm
附带一个 expm/src/locale.h
文件,该文件包含在 expm.h
中,并使包包含 <libintl.h>
如果它存在(在一个简单的系统上这将可能指向 /usr/include/libintl.h
),这将依次包含 C 库的标准 locale.h
(例如 /usr/include/locale.h
)。
但是我的 $CPATH
环境变量有一个尾随的 :
(它不应该)导致当前目录(在本例中为 expm/src/
)在搜索路径中<...>
包括。因此 libintl.h
循环回到 expm/src/locale.h
并且标准库 locale.h
实际上并没有被包含在内。
解决方案是修复我的 $CPATH
。