Next I tried running the commands:
yum install udunits2-devel
yum install cairo-devel
I tried running the install packages command again,and got this result
install.packages(c('mapview', 'plotKML', 'leafpop', 'rgdal'), repos='http://cran.rstudio.com/')
Installing packages into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘gdtools’, ‘leafem’, ‘sf’, ‘svglite’, ‘XML’, ‘RSAGA’
trying URL 'http://cran.rstudio.com/src/contrib/gdtools_0.2.1.tar.gz'
Content type 'application/x-gzip' length 32043 bytes (31 KB)
==================================================
downloaded 31 KB
trying URL 'http://cran.rstudio.com/src/contrib/leafem_0.0.1.tar.gz'
Content type 'application/x-gzip' length 2844830 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
trying URL 'http://cran.rstudio.com/src/contrib/sf_0.8-1.tar.gz'
Content type 'application/x-gzip' length 8469173 bytes (8.1 MB)
==================================================
downloaded 8.1 MB
trying URL 'http://cran.rstudio.com/src/contrib/svglite_1.2.3.tar.gz'
Content type 'application/x-gzip' length 43314 bytes (42 KB)
==================================================
downloaded 42 KB
trying URL 'http://cran.rstudio.com/src/contrib/XML_3.99-0.3.tar.gz'
Content type 'application/x-gzip' length 968543 bytes (945 KB)
==================================================
downloaded 945 KB
trying URL 'http://cran.rstudio.com/src/contrib/RSAGA_1.3.0.tar.gz'
Content type 'application/x-gzip' length 2599558 bytes (2.5 MB)
==================================================
downloaded 2.5 MB
trying URL 'http://cran.rstudio.com/src/contrib/mapview_2.7.0.tar.gz'
Content type 'application/x-gzip' length 2029313 bytes (1.9 MB)
==================================================
downloaded 1.9 MB
trying URL 'http://cran.rstudio.com/src/contrib/plotKML_0.6-0.tar.gz'
Content type 'application/x-gzip' length 3448183 bytes (3.3 MB)
==================================================
downloaded 3.3 MB
trying URL 'http://cran.rstudio.com/src/contrib/leafpop_0.0.5.tar.gz'
Content type 'application/x-gzip' length 1868188 bytes (1.8 MB)
==================================================
downloaded 1.8 MB
trying URL 'http://cran.rstudio.com/src/contrib/rgdal_1.4-8.tar.gz'
Content type 'application/x-gzip' length 1698902 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘gdtools’ ...
** package ‘gdtools’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm
Using PKG_LIBS=-lcairo -lfreetype
** libs
rm -f gdtools.so CairoContext.o RcppExports.o font_metrics.o gdtools.o raster_to_base64.o versions.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c CairoContext.cpp -o CairoContext.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c font_metrics.cpp -o font_metrics.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c gdtools.cpp -o gdtools.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c raster_to_base64.cpp -o raster_to_base64.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm -I../inst/include/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c versions.cpp -o versions.o
g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o gdtools.so CairoContext.o RcppExports.o font_metrics.o gdtools.o raster_to_base64.o versions.o -lcairo -lfreetype -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/00LOCK-gdtools/00new/gdtools/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package ‘gdtools’
finding HTML links ... done
font_family_exists html
fontconfig_reinit html
glyphs_match html
m_str_extents html
match_family html
raster_str html
raster_write html
set_dummy_conf html
str_extents html
str_metrics html
sys_fonts html
version_cairo html
Rd warning: /tmp/Rtmp54K2wC/R.INSTALL59506a4f99af/gdtools/man/version_cairo.Rd:15: file link ‘packageVersion’ in package ‘utils’ does not exist and so has been treated as a topic
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gdtools)
Making 'packages.html' ... done
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64 -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/usr/lib64/R/library/sf’
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /usr/bin/sed
checking for pkg-config... /bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/usr/lib64/R/library/XML’
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /usr/lib64/R
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64 -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-7
checking for /usr/bin/svnversion... no
configure: svn revision: 845
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/lib64/R/library/rgdal’
ERROR: dependency ‘sf’ is not available for package ‘leafem’
* removing ‘/usr/lib64/R/library/leafem’
* installing *source* package ‘svglite’ ...
** package ‘svglite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/gdtools/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/gdtools/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c devSVG.cpp -o devSVG.o
g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o svglite.so RcppExports.o devSVG.o -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/00LOCK-svglite/00new/svglite/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package ‘svglite’
finding HTML links ... done
editSVG html
htmlSVG html
stringSVG html
svglite html
svgstring html
xmlSVG html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (svglite)
Making 'packages.html' ... done
ERROR: dependency ‘rgdal’ is not available for package ‘RSAGA’
* removing ‘/usr/lib64/R/library/RSAGA’
ERROR: dependencies ‘XML’, ‘rgdal’, ‘RSAGA’ are not available for package ‘plotKML’
* removing ‘/usr/lib64/R/library/plotKML’
ERROR: dependency ‘sf’ is not available for package ‘leafpop’
* removing ‘/usr/lib64/R/library/leafpop’
ERROR: dependencies ‘leafem’, ‘leafpop’, ‘sf’ are not available for package ‘mapview’
* removing ‘/usr/lib64/R/library/mapview’
The downloaded source packages are in
‘/tmp/RtmpFCowzw/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘sf’ had non-zero exit status
2: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘XML’ had non-zero exit status
3: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘rgdal’ had non-zero exit status
4: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘leafem’ had non-zero exit status
5: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘RSAGA’ had non-zero exit status
6: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘plotKML’ had non-zero exit status
7: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘leafpop’ had non-zero exit status
8: In install.packages(c("mapview", "plotKML", "leafpop", "rgdal"), :
installation of package ‘mapview’ had non-zero exit status
>
>
I'm still stuck. Shouldn't it be easier to load packages? What am I doing wrong?