R版本刚升级到"4.0.3",安装R包crayon
,报错
>install.packages("crayon")
There is a binary version available but the source version is later:
binary source needs_compilation
crayon 1.3.4 1.4.0 FALSE
installing the source package ‘crayon’
试开URL’https://cran.rstudio.com/src/contrib/crayon_1.4.0.tar.gz'
Content type 'application/x-gzip' length 35679 bytes (34 KB)
==================================================
downloaded 34 KB
Warning in file(con, "r") :
无法打开文件'/var/db/timezone/zoneinfo/+VERSION': No such file or directory
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: 27698 Done echo 'tools:::.install_packages()'
27699 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 ‘crayon’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/mn/fqfrjmv97bxdfgxcnwftwzwh0000gn/T/Rtmpcit9GU/downloaded_packages’
试了无数遍,其他软件安装时也出现类似情况,最后解决方法为
> install.packages("crayon", type="binary")
There is a binary version available (and will be installed) but the source
version is later:
binary source
crayon 1.3.4 1.4.0
试开URL’https://cran.rstudio.com/bin/macosx/contrib/4.0/crayon_1.3.4.tgz'
Content type 'application/x-gzip' length 748897 bytes (731 KB)
==================================================
downloaded 731 KB
The downloaded binary packages are in
/var/folders/mn/fqfrjmv97bxdfgxcnwftwzwh0000gn/T//Rtmpcit9GU/downloaded_packages
核心是安装时用的source
不是binary
,换成binary
就可以了,我也不知道为什么,能用就行
网友评论