我今天重新安装了R和RStudio,现在整齐的verse将不会加载,包括当我为安装和加载指定(或不指定)库的时候。已经重启了多次,每次的问题都是“没有名为‘httr’的包”。代码示例:
install.packages("tidyverse", dependencies = TRUE, lib = "/Users/Darcy/Library/R/4.0/library")
library(tidyverse, lib = "/Users/Darcy/Library/R/4.0/library")以及由此导致的失败(完全):
> install.packages("tidyverse", dependencies = TRUE, lib = "/Users/Darcy/Library/R/4.0/library")
also installing the dependency ‘httr’
There is a binary version available but the source version is later:
binary source needs_compilation
httr 1.4.1 1.4.2 FALSE
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433049 bytes (422 KB)
==================================================
downloaded 422 KB
The downloaded binary packages are in
/var/folders/rl/vd2lvhf96fd9d69qvmc9pys00000gq/T//Rtmpj5S5Yc/downloaded_packages
installing the source package ‘httr’
trying URL 'https://cran.rstudio.com/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB
dyld: lazy symbol binding failed: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 1057 Done echo 'tools:::.install_packages()'
1058 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/rl/vd2lvhf96fd9d69qvmc9pys00000gq/T/Rtmpj5S5Yc/downloaded_packages’
> library(tidyverse, lib = "/Users/Darcy/Library/R/4.0/library")
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘httr’发布于 2020-07-26 05:24:57
我的iMac电脑不能再更新了,但切换到R3.6.3 (El Capitan)是一个有效的解决方案。
我错误地将R从3.4.2更新为4.0.2,这太远了。
https://stackoverflow.com/questions/63024034
复制相似问题