[英]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
heroku構建包中存在一個錯誤,已修復。
您可以嘗試從此處包括二進制文件。 msm
軟件包似乎可以作為二進制文件使用。
我有相同的錯誤,原因有所不同。
expm
附帶一個expm/src/locale.h
文件,該文件包含在expm.h
,並且使該軟件包包含<libintl.h>
如果存在)(在簡單系統上,它可能指向/usr/include/libintl.h
),它將依次包含C庫的標准locale.h
(例如/usr/include/locale.h
)。
但是我的$CPATH
環境變量有一個尾隨:
不應該)導致當前目錄(在本例中為expm/src/
)位於<...>
include的搜索路徑中。 因此, libintl.h
循環回到了expm/src/locale.h
,而實際上並未包含標准庫locale.h
。
解決的辦法是修復我的$CPATH
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.