在R中安装ggp​​lot2 / digest时出错

时间:2013-05-15 22:46:54

标签: r ggplot2 digest

尝试安装ggplot2后,我收到以下错误,而digest又尝试安装sha2.c(88): catastrophic error: #error directive: Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN #error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN 。会话信息粘贴在下面。

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8            LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C                   LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] kernlab_0.9-18   xts_0.9-3        lmtest_0.9-31    sandwich_2.2-10  reshape2_1.2.2   plyr_1.8             zoo_1.7-9        data.table_1.8.8

loaded via a namespace (and not attached):
[1] grid_2.15.2     lattice_0.20-13 stringr_0.6.2   tcltk_2.15.2    tools_2.15.2 

之前有没有遇到过这个?

{{1}}

1 个答案:

答案 0 :(得分:1)

我遇到了这个问题,似乎是因为您的操作系统标头没有定义BYTE_ORDER。我不知道Linux发行版省略了什么,但我通过

解决了这个问题
$ wget http://cran.stat.ucla.edu/src/contrib/digest_0.6.3.tar.gz
$ tar zxvf digest_0.6.3.tar.gz

然后编辑digest / src / sha2.c并在顶部附近贴上以下行:

#define BYTE_ORDER LITTLE_ENDIAN

(这假设你的机器实际上是小端的;英特尔/ AMD处理器属于这一类)。然后

R CMD INSTALL digest
* installing to library ‘/N/u/glock/sierra/R/lib64/R/library’
* installing *source* package ‘digest’ ...
file ‘src/sha2.c’ has the wrong MD5 checksum

错误的MD5校验和是无害的。