R包在macOS上更新后私有下载



自从我的Mac上更新了R(11.2.2版本),我无法下载任何软件包。是的,我可以,但是它被放在一个"私有的">

例如,当我想下载'mapsf'时,它会给我这个错误:

Installing package into ‘/Users/elifka/Library/R/3.6/library’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘mapsf’
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package ‘mapsf’
trying URL 'http://cran.rstudio.com/src/contrib/mapsf_0.1.1.tar.gz'
Content type 'application/x-gzip' length 2904481 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
* installing *source* package ‘mapsf’ ...
** package ‘mapsf’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c RcppExports.cpp -o RcppExports.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c init.c -o init.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c layout.cpp -o layout.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -Wl,-rpath,/Library/Frameworks/R.framework/Resources/lib /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o mapsf.so RcppExports.o init.o layout.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: framework not found CoreFoundation
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mapsf.so] Error 1
ERROR: compilation failed for package ‘mapsf’
* removing ‘/Users/elifka/Library/R/3.6/library/mapsf’
Warning in install.packages :
installation of package ‘mapsf’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/h3/vt0n6y2534b35ss3dzf_037m0000gn/T/RtmpV1gjTe/downloaded_packages’

我试着把type='binary'放在install.packages()中,因为它是在另一个帖子中建议的,但它没有做的工作。我也试着把'no'用于编译,它也不工作。

欢呼,

Ok,所以我通过删除R Studio和R并重新安装它们来修复它。

删除R Studio和R并重新安装它们对我来说也是有效的

最新更新