I am trying to install the ggmap
package in R, but the dependency package jpeg
has this error:
> 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’
My R is updated, I'm using R 3.6.1 for Mac.
I have tried updating rlang
, it is version 0.4.0.
Are there any solutions for this, or alternative packages that can be used to download google maps directly into R Markdown? Thanks in advance.