我在this guide之后在Ubuntu上安装了R-devel。在尝试使用install.packages("magrittr")
安装magrittr时,我得到了这个:
* installing *source* package ‘magrittr’ ...
** package ‘magrittr’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'checkCompilerOptions' not found
Calls: ::: -> get
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/magrittr’
The downloaded source packages are in
‘/tmp/RtmpagwvBj/downloaded_packages’
Warning message:
In install.packages("magrittr") :
installation of package ‘magrittr’ had non-zero exit status
引用此错误的single other stackoverflow question对我没有帮助。有人可以帮忙吗?
我真正尝试做的是安装Gviz软件包的最新开发版本。为了做到这一点I must use the development version of bioconductor and R。在Gviz的依赖树中,下来是magrittr。
我的sessionInfo():
R Under development (unstable) (2016-02-18 r70185)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=nb_NO.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=nb_NO.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=nb_NO.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] tools_3.3.0 tcltk_3.3.0
答案 0 :(得分:2)
我在安装raster
包时遇到同样的问题。我发现here问题是您提到的指南的第二个脚本导出的库目录之间存在冲突:
#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library::/usr/lib/R/library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$@"
所以我删除了与我的R-devel实例无关的库文件夹:
#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$@"
它终于奏效了。
答案 1 :(得分:1)
我能够安装Gviz!这就是让我在那里的原因:
devtools::install_github("Bioconductor-mirror/Gviz")
安装Gviz,而不是使用biocLite("Gviz")
。这让我得到checkCompilerOptions
错误,但现在使用包matrixStats。devtools::install_github("HenrikBengtsson/matrixStats")
安装了matrixStats。这很有用。install.packages("magrittr")
再次安装magrittr。它以某种方式工作!devtools::install_github("Bioconductor-mirror/Gviz")
我仍然不知道checkCompilerOptions
错误,并会感谢任何想法。