我在安装插入符(caret_6.0-77.tar.gz)时遇到了困难,因为它坚持使用较旧且不兼容的库; “rlang”(0.1.1)。我在本地安装了适当版本的rlang(0.1.2)。但是它不会使用该版本。
loadNamespace(i,c(lib.loc,.libPaths()),versionCheck = vI [[i]])出错:
命名空间'rlang'0.1.1已加载,但
有没有办法强制使用本地包而不是全局库中的包?
我正在使用公司安装,因此我没有对全局库的写访问权限。这就是我使用本地图书馆的原因。
install.packages(file.choose(), repos = NULL, type = "source")
Installing package into ‘/xxxxx/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package ‘caret’ ...
** package ‘caret’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/tool/pandora64/.package/R-3.2.3/lib64/R/include -DNDEBUG -I/usr/local/include -fpic -g -O2 -c caret.c -o caret.o
gcc -std=gnu99 -shared -L/tool/pandora64/.package/R-3.2.3/lib64/R/lib -L/usr/local/lib64 -o caret.so caret.o -L/tool/pandora64/.package/R-3.2.3/lib64/R/lib -lR
installing to xxxxx/R/x86_64-pc-linux-gnu-library/3.2/caret/libs
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by ‘plyr::ddply’ when loading ‘caret’
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 0.1.1 is already loaded, but >= 0.1.2 is required
ERROR: lazy loading failed for package ‘caret’
* removing ‘xxxxx/R/x86_64-pc-linux-gnu-library/3.2/caret’
Warning in install.packages :
installation of package ‘xxxx/R_Packages/R_Packages/Source/caret_6.0-77.tar.gz’ had non-zero exit status
>
答案 0 :(得分:0)
caret
不需要rlang
;其中一个依赖项。
我建议
rlang
安装到您的本地库路径.libPaths()
以确保您的本地库路径位于规范路径之前(您无法修改)。 [这可能完全是问题] caret