我正在尝试在R中安装ggmap
软件包,但是依赖软件包jpeg
出现此错误:
> install.packages('ggmap')
also installing the dependency ‘jpeg’
There is a binary version available but the source version is later:
binary source needs_compilation
jpeg 0.1-8 0.1-8.1 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ggmap_3.0.0.tgz'
Content type 'application/x-gzip' length 4698880 bytes (4.5 MB)
==================================================
downloaded 4.5 MB
The downloaded binary packages are in
/var/folders/s1/r6h4z6p93731tv7xgdlv55t40000gn/T//RtmpfHHPTi/downloaded_packages
installing the source package ‘jpeg’
trying URL 'https://cran.rstudio.com/src/contrib/jpeg_0.1-8.1.tar.gz'
Content type 'application/x-gzip' length 18116 bytes (17 KB)
==================================================
downloaded 17 KB
* installing *source* package ‘jpeg’ ...
** package ‘jpeg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c read.c -o read.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from read.c:1:
./rjcommon.h:7:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [read.o] Error 1
ERROR: compilation failed for package ‘jpeg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jpeg’
Warning in install.packages :
installation of package ‘jpeg’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/s1/r6h4z6p93731tv7xgdlv55t40000gn/T/RtmpfHHPTi/downloaded_packages’
我的R已更新,我在Mac上使用R 3.6.1。
我尝试更新rlang
,它的版本是0.4.0。
有没有针对此的解决方案,或可用于直接将Google地图下载到R Markdown中的替代软件包?提前致谢。