Sf: Hi, am not able to install "sf" in R; using macOS high sierra

Created on 20 Mar 2018  Â·  17Comments  Â·  Source: r-spatial/sf

The error is as below. Thank you so much.

``

install.packages("sf",dependencies = T)
also installing the dependencies ‘protolite’, ‘geojson’, ‘jqr’, ‘jsonvalidate’, ‘V8’, ‘geojsonio’, ‘geojsonlint’, ‘osmar’, ‘rmapshaper’, ‘XML’, ‘expm’, ‘viridis’, ‘gdtools’, ‘udunits2’, ‘deldir’, ‘tmaptools’, ‘spdep’, ‘leaflet’, ‘gdalUtils’, ‘svglite’, ‘units’, ‘classInt’, ‘lwgeom’, ‘rgdal’, ‘rgeos’, ‘spatstat’, ‘tmap’, ‘mapview’

trying URL 'https://cran.rstudio.com/src/contrib/protolite_1.7.tar.gz'
Content type 'application/x-gzip' length 16835 bytes (16 KB)
==================================================
downloaded 16 KB

trying URL 'https://cran.rstudio.com/src/contrib/geojson_0.2.0.tar.gz'
Content type 'application/x-gzip' length 1008918 bytes (985 KB)
==================================================
downloaded 985 KB

trying URL 'https://cran.rstudio.com/src/contrib/jqr_1.0.0.tar.gz'
Content type 'application/x-gzip' length 50196 bytes (49 KB)
==================================================
downloaded 49 KB

trying URL 'https://cran.rstudio.com/src/contrib/jsonvalidate_1.0.0.tar.gz'
Content type 'application/x-gzip' length 104657 bytes (102 KB)
==================================================
downloaded 102 KB

trying URL 'https://cran.rstudio.com/src/contrib/V8_1.5.tar.gz'
Content type 'application/x-gzip' length 327013 bytes (319 KB)
==================================================
downloaded 319 KB

trying URL 'https://cran.rstudio.com/src/contrib/geojsonio_0.5.0.tar.gz'
Content type 'application/x-gzip' length 2909962 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

trying URL 'https://cran.rstudio.com/src/contrib/geojsonlint_0.2.0.tar.gz'
Content type 'application/x-gzip' length 911798 bytes (890 KB)
==================================================
downloaded 890 KB

trying URL 'https://cran.rstudio.com/src/contrib/osmar_1.1-7.tar.gz'
Content type 'application/x-gzip' length 79505 bytes (77 KB)
==================================================
downloaded 77 KB

trying URL 'https://cran.rstudio.com/src/contrib/rmapshaper_0.3.0.tar.gz'
Content type 'application/x-gzip' length 743575 bytes (726 KB)
==================================================
downloaded 726 KB

trying URL 'https://cran.rstudio.com/src/contrib/XML_3.98-1.10.tar.gz'
Content type 'application/x-gzip' length 1599492 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

trying URL 'https://cran.rstudio.com/src/contrib/expm_0.999-2.tar.gz'
Content type 'application/x-gzip' length 136750 bytes (133 KB)
==================================================
downloaded 133 KB

trying URL 'https://cran.rstudio.com/src/contrib/viridis_0.5.0.tar.gz'
Content type 'application/x-gzip' length 1754678 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/gdtools_0.1.7.tar.gz'
Content type 'application/x-gzip' length 35268 bytes (34 KB)
==================================================
downloaded 34 KB

trying URL 'https://cran.rstudio.com/src/contrib/udunits2_0.13.tar.gz'
Content type 'application/x-gzip' length 67182 bytes (65 KB)
==================================================
downloaded 65 KB

trying URL 'https://cran.rstudio.com/src/contrib/deldir_0.1-14.tar.gz'
Content type 'application/x-gzip' length 73142 bytes (71 KB)
==================================================
downloaded 71 KB

trying URL 'https://cran.rstudio.com/src/contrib/tmaptools_1.2-3.tar.gz'
Content type 'application/x-gzip' length 80748 bytes (78 KB)
==================================================
downloaded 78 KB

trying URL 'https://cran.rstudio.com/src/contrib/spdep_0.7-4.tar.gz'
Content type 'application/x-gzip' length 1852930 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/src/contrib/leaflet_1.1.0.tar.gz'
Content type 'application/x-gzip' length 2415138 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/gdalUtils_2.0.1.7.tar.gz'
Content type 'application/x-gzip' length 1057639 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/svglite_1.2.1.tar.gz'
Content type 'application/x-gzip' length 41315 bytes (40 KB)
==================================================
downloaded 40 KB

trying URL 'https://cran.rstudio.com/src/contrib/units_0.5-1.tar.gz'
Content type 'application/x-gzip' length 836705 bytes (817 KB)
==================================================
downloaded 817 KB

trying URL 'https://cran.rstudio.com/src/contrib/classInt_0.1-24.tar.gz'
Content type 'application/x-gzip' length 19194 bytes (18 KB)
==================================================
downloaded 18 KB

trying URL 'https://cran.rstudio.com/src/contrib/lwgeom_0.1-4.tar.gz'
Content type 'application/x-gzip' length 432706 bytes (422 KB)
==================================================
downloaded 422 KB

trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.2-18.tar.gz'
Content type 'application/x-gzip' length 1650578 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/src/contrib/rgeos_0.3-26.tar.gz'
Content type 'application/x-gzip' length 250574 bytes (244 KB)
==================================================
downloaded 244 KB

trying URL 'https://cran.rstudio.com/src/contrib/spatstat_1.55-0.tar.gz'
Content type 'application/x-gzip' length 6360605 bytes (6.1 MB)
==================================================
downloaded 6.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/tmap_1.11-1.tar.gz'
Content type 'application/x-gzip' length 3886352 bytes (3.7 MB)
==================================================
downloaded 3.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/mapview_2.3.0.tar.gz'
Content type 'application/x-gzip' length 1877698 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/src/contrib/sf_0.6-0.tar.gz'
Content type 'application/x-gzip' length 7399611 bytes (7.1 MB)
==================================================
downloaded 7.1 MB

* installing *source* package ‘protolite’ ...
** package ‘protolite’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/local/opt/protobuf/include
Using PKG_LIBS=-L/usr/local/opt/protobuf/lib -lprotobuf
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because protobuf was not found. Try installing:
 * deb: libprotobuf-dev (Debian, Ubuntu, etc)
 * rpm: protobuf-devel (Fedora, EPEL)
 * csw: protobuf_dev (Solaris)
 * brew: protobuf (OSX)
If protobuf is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a protobuf.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘protolite’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/protolite’
Warning in install.packages :
  installation of package ‘protolite’ had non-zero exit status
* installing *source* package ‘jqr’ ...
** package ‘jqr’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/local/opt/jq/include
Using PKG_LIBS=-L/usr/local/lib -ljq
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libjq was not found.
On Ubuntu 14.04 or 16.04 you can use the PPA:
  sudo add-apt-repository -y ppa:opencpu/jq
  sudo apt-get update
  sudo apt-get install libjq-dev
On other sytems try installing:
 * deb: libjq-dev (Debian, Ubuntu 16.10 and up).
 * rpm: jq-devel (Fedora, EPEL)
 * csw: libjq_dev (Solaris)
 * brew: jq (OSX)
If  is already installed set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘jqr’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/jqr’
Warning in install.packages :
  installation of package ‘jqr’ had non-zero exit status
* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/local/opt/[email protected]/include
Using PKG_LIBS=-L/usr/local/opt/[email protected]/lib -lv8
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because  was not found. Try installing:
 * deb: libv8-3.14-dev (formerly: libv8-dev) (Debian, Ubuntu)
 * rpm: v8-314-devel (formerly: v8-devel) (Fedora, EPEL)
 * brew: [email protected] (OSX) -- NOT regular v8! Tap from homebrew/versions
 * csw: libv8_dev (Solaris)
To use a custom libv8, set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘V8’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/V8’
Warning in install.packages :
  installation of package ‘V8’ had non-zero exit status
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-apple-darwin13.4.0-clang accepts -g... yes
checking for x86_64-apple-darwin13.4.0-clang option to accept ISO C89... none needed
checking how to run the C preprocessor... x86_64-apple-darwin13.4.0-clang -E
checking for sed... /usr/bin/sed
checking for pkg-config... no
checking for xml2-config... /Users/sherrymukim/anaconda3/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 9, Patch 4 for 2.9.4
Located parser file -I/Users/sherrymukim/anaconda3/include/libxml2 -I/Users/sherrymukim/anaconda3/include/parser.h
Checking for 1.8:  -I/Users/sherrymukim/anaconda3/include/libxml2 -I/Users/sherrymukim/anaconda3/include
Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... yes
You are trying to use a version 2.* edition of libxml
but an incompatible library. The header files and library seem to be
mismatched. If you have specified LIBXML_INCDIR, make certain to also
specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default
directories.
ERROR: configuration failed for package ‘XML’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status
* installing *source* package ‘expm’ ...
** package ‘expm’ successfully unpacked and MD5 sums checked
** libs
clang -I/Users/sherrymukim/anaconda3/lib/R/include -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/sherrymukim/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/sherrymukim/anaconda3/include  -c R_dgebal.c -o R_dgebal.o
clang -I/Users/sherrymukim/anaconda3/lib/R/include -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/sherrymukim/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/sherrymukim/anaconda3/include  -c expm-eigen.c -o expm-eigen.o
clang -I/Users/sherrymukim/anaconda3/lib/R/include -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/sherrymukim/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/sherrymukim/anaconda3/include  -c expm.c -o expm.o
clang -I/Users/sherrymukim/anaconda3/lib/R/include -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/sherrymukim/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/sherrymukim/anaconda3/include  -c init.c -o init.o
clang -I/Users/sherrymukim/anaconda3/lib/R/include -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/sherrymukim/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/sherrymukim/anaconda3/include  -c logm-eigen.c -o logm-eigen.o
/Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran   -fPIC  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib  -c matexp.f -o matexp.o
make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
make: *** [matexp.o] Error 1
ERROR: compilation failed for package ‘expm’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/expm’
Warning in install.packages :
  installation of package ‘expm’ had non-zero exit status
* installing *source* package ‘viridis’ ...
** package ‘viridis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘cividis’ is not exported by 'namespace:viridisLite'
ERROR: lazy loading failed for package ‘viridis’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/viridis’
Warning in install.packages :
  installation of package ‘viridis’ had non-zero exit status
* installing *source* package ‘gdtools’ ...
** package ‘gdtools’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/local/opt/cairo/include/cairo
Using PKG_LIBS=-L/usr/local/opt/cairo/lib -lcairo
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because cairo was not found. Try installing:
 * deb: libcairo2-dev (Debian, Ubuntu)
 * rpm: cairo-devel (Fedora, CentOS, RHEL)
 * csw: libcairo_dev (Solaris)
 * brew: cairo (OSX)
If cairo is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a cairo.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘gdtools’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/gdtools’
Warning in install.packages :
  installation of package ‘gdtools’ had non-zero exit status
* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... no
-----Error: libudunits2.a not found-----
     If the udunits2 library is installed in a non-standard location,
     use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
     or --configure-args='--with-udunits2-include=/usr/include/udunits2'
     replacing paths with appropriate values for your installation.
     You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
     environment variables.
     If udunits2 is not installed, please install it.
     It is required for this package.
ERROR: configuration failed for package ‘udunits2’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/udunits2’
Warning in install.packages :
  installation of package ‘udunits2’ had non-zero exit status
* installing *source* package ‘deldir’ ...
** package ‘deldir’ successfully unpacked and MD5 sums checked
** libs
/Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran   -fPIC  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib  -c acchk.f -o acchk.o
make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
make: *** [acchk.o] Error 1
ERROR: compilation failed for package ‘deldir’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/deldir’
Warning in install.packages :
  installation of package ‘deldir’ had non-zero exit status
* installing *source* package ‘classInt’ ...
** package ‘classInt’ successfully unpacked and MD5 sums checked
** libs
/Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran   -fPIC  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib  -c fish1.f -o fish1.o
make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
make: *** [fish1.o] Error 1
ERROR: compilation failed for package ‘classInt’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/classInt’
Warning in install.packages :
  installation of package ‘classInt’ had non-zero exit status
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: CC: x86_64-apple-darwin13.4.0-clang
configure: CXX: x86_64-apple-darwin13.4.0-clang++
configure: rgdal: 1.2-18
checking for /usr/bin/svnversion... yes
configure: svn revision: 718
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status
* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: x86_64-apple-darwin13.4.0-clang
configure: CXX: x86_64-apple-darwin13.4.0-clang++
configure: rgeos: 0.3-26
checking for /usr/bin/svnversion... yes
configure: svn revision: 560
checking for geos-config... no
no
configure: error: geos-config not found or not executable.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/rgeos’
Warning in install.packages :
  installation of package ‘rgeos’ had non-zero exit status
ERROR: dependencies ‘protolite’, ‘jqr’ are not available for package ‘geojson’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/geojson’
Warning in install.packages :
  installation of package ‘geojson’ had non-zero exit status
ERROR: dependency ‘V8’ is not available for package ‘jsonvalidate’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/jsonvalidate’
Warning in install.packages :
  installation of package ‘jsonvalidate’ had non-zero exit status
ERROR: dependency ‘XML’ is not available for package ‘osmar’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/osmar’
Warning in install.packages :
  installation of package ‘osmar’ had non-zero exit status
ERROR: dependencies ‘deldir’, ‘expm’ are not available for package ‘spdep’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/spdep’
Warning in install.packages :
  installation of package ‘spdep’ had non-zero exit status
ERROR: dependency ‘viridis’ is not available for package ‘leaflet’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/leaflet’
Warning in install.packages :
  installation of package ‘leaflet’ had non-zero exit status
ERROR: dependency ‘rgdal’ is not available for package ‘gdalUtils’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/gdalUtils’
Warning in install.packages :
  installation of package ‘gdalUtils’ had non-zero exit status
ERROR: dependency ‘gdtools’ is not available for package ‘svglite’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/svglite’
Warning in install.packages :
  installation of package ‘svglite’ had non-zero exit status
ERROR: dependency ‘udunits2’ is not available for package ‘units’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/units’
Warning in install.packages :
  installation of package ‘units’ had non-zero exit status
ERROR: dependency ‘deldir’ is not available for package ‘spatstat’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/spatstat’
Warning in install.packages :
  installation of package ‘spatstat’ had non-zero exit status
ERROR: dependencies ‘rgdal’, ‘rgeos’, ‘V8’, ‘geojson’, ‘jqr’ are not available for package ‘geojsonio’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/geojsonio’
Warning in install.packages :
  installation of package ‘geojsonio’ had non-zero exit status
ERROR: dependencies ‘jsonvalidate’, ‘V8’ are not available for package ‘geojsonlint’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/geojsonlint’
Warning in install.packages :
  installation of package ‘geojsonlint’ had non-zero exit status
ERROR: dependencies ‘units’, ‘classInt’ are not available for package ‘sf’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/sf’
Warning in install.packages :
  installation of package ‘sf’ had non-zero exit status
ERROR: dependencies ‘rgdal’, ‘V8’, ‘geojsonio’, ‘geojsonlint’ are not available for package ‘rmapshaper’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/rmapshaper’
Warning in install.packages :
  installation of package ‘rmapshaper’ had non-zero exit status
ERROR: dependencies ‘units’, ‘sf’ are not available for package ‘lwgeom’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/lwgeom’
Warning in install.packages :
  installation of package ‘lwgeom’ had non-zero exit status
ERROR: dependencies ‘leaflet’, ‘gdalUtils’, ‘sf’, ‘svglite’ are not available for package ‘mapview’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/mapview’
Warning in install.packages :
  installation of package ‘mapview’ had non-zero exit status
ERROR: dependencies ‘rgdal’, ‘rgeos’, ‘classInt’, ‘osmar’, ‘rmapshaper’, ‘spdep’, ‘XML’ are not available for package ‘tmaptools’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/tmaptools’
Warning in install.packages :
  installation of package ‘tmaptools’ had non-zero exit status
ERROR: dependencies ‘tmaptools’, ‘rgdal’, ‘rgeos’, ‘classInt’, ‘spdep’, ‘leaflet’, ‘mapview’ are not available for package ‘tmap’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/tmap’
Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/p9/6qp4xp2536jdmxd8qkzkhp7m0000gn/T/Rtmp5Pyjud/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
``

Most helpful comment

@sagar-m if you use the recommended R for mac, everything will work out of the box. If you really want to use the anaconda version of R, you better ask your question over there, this is a problem with their setup.

All 17 comments

Hi, tried following the steps on link

And getting the following error. Thank you.

mukim:anaconda3 sherrymukim$ R CMD INSTALL sf_0.6-0.tar.gz --configure-args='-with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/2.1/unix/bin/gdal-config -with-geos-config=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config'
* installing to library ‘/Users/sherrymukim/anaconda3/lib/R/library’
ERROR: dependencies ‘units’, ‘classInt’ are not available for package ‘sf’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/sf’
`> install.packages("classInt")
trying URL 'https://cran.rstudio.com/src/contrib/classInt_0.1-24.tar.gz'
Content type 'application/x-gzip' length 19194 bytes (18 KB)
==================================================
downloaded 18 KB

* installing *source* package ‘classInt’ ...
** package ‘classInt’ successfully unpacked and MD5 sums checked
** libs
/Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran   -fPIC  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib  -c fish1.f -o fish1.o
make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
make: *** [fish1.o] Error 1
ERROR: compilation failed for package ‘classInt’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/classInt’
Warning in install.packages :
  installation of package ‘classInt’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/p9/6qp4xp2536jdmxd8qkzkhp7m0000gn/T/Rtmp5Pyjud/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done



> install.packages("units")
also installing the dependency ‘udunits2’

trying URL 'https://cran.rstudio.com/src/contrib/udunits2_0.13.tar.gz'
Content type 'application/x-gzip' length 67182 bytes (65 KB)
==================================================
downloaded 65 KB

trying URL 'https://cran.rstudio.com/src/contrib/units_0.5-1.tar.gz'
Content type 'application/x-gzip' length 836705 bytes (817 KB)
==================================================
downloaded 817 KB

* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... no
-----Error: libudunits2.a not found-----
     If the udunits2 library is installed in a non-standard location,
     use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
     or --configure-args='--with-udunits2-include=/usr/include/udunits2'
     replacing paths with appropriate values for your installation.
     You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
     environment variables.
     If udunits2 is not installed, please install it.
     It is required for this package.
ERROR: configuration failed for package ‘udunits2’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/udunits2’
Warning in install.packages :
  installation of package ‘udunits2’ had non-zero exit status
ERROR: dependency ‘udunits2’ is not available for package ‘units’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/units’
Warning in install.packages :
  installation of package ‘units’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/p9/6qp4xp2536jdmxd8qkzkhp7m0000gn/T/Rtmp5Pyjud/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done`

If you don't understand your own system, install OSX binary CRAN packages. classInt and units are available. And sf is available for binary install from CRAN too. If your OSX is too new, move to a version that works, or to a more capable OS (even Windows is less of a problem for open source software).

Hi, I just downloaded and installed Xcode and yet I am getting the following error. Please assist. Thanks.

```

install.packages("classInt",dependencies = T)
trying URL 'https://cran.rstudio.com/src/contrib/classInt_0.1-24.tar.gz'
Content type 'application/x-gzip' length 19194 bytes (18 KB)

==================================================
downloaded 18 KB

  • installing source package ‘classInt’ ...
    * package ‘classInt’ successfully unpacked and MD5 sums checked
    *
    libs
    /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -fPIC -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib -c fish1.f -o fish1.o
    make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
    make: * [fish1.o] Error 1
    ERROR: compilation failed for package ‘classInt’
  • removing ‘/Users/sherrymukim/anaconda3/lib/R/library/classInt’
    Warning in install.packages :
    installation of package ‘classInt’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/p9/6qp4xp2536jdmxd8qkzkhp7m0000gn/T/RtmpENRNpn/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

```

INSTALL BINARY!!!

Your problem has to do with not being able to install R source package on your platform. Please seek help somewhere else, and come back here when your problem has to do with the sf package.

Hi @edzer , yes I will dig somewhere else :), I wrote here as I did not face this issue with "sp" and few other packages. Thanks!

Hi @rsbivand thanks for the suggestion. I tried binary, and both "classint" and "units" did not work. Probably got to do with R 3.4.2 version.

> install.packages("classInt",dependencies = T,type="mac.binary")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/contrib/3.4:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/3.4/PACKAGES'

   package ‘classInt’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘classInt’ is not available (as a binary package for R version 3.4.2)
> install.packages("units",dependencies = T,type="mac.binary")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/contrib/3.4:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/3.4/PACKAGES'

   package ‘units’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘units’ is not available (as a binary package for R version 3.4.2)

update: this link has a solution that worked for me. I was able to install "udunits2", and "units". However, they do not mention "ClassInt" and it is throwing an error. I will ask them, probably. Thank you.

`> install.packages('classInt')
trying URL 'https://cran.rstudio.com/src/contrib/classInt_0.1-24.tar.gz'
Content type 'application/x-gzip' length 19194 bytes (18 KB)
==================================================
downloaded 18 KB

* installing *source* package ‘classInt’ ...
** package ‘classInt’ successfully unpacked and MD5 sums checked
** libs
/Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran   -fPIC  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/Users/sherrymukim/anaconda3/include -L/Users/sherrymukim/anaconda3/lib  -c fish1.f -o fish1.o
make: /Users/sherrymukim/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directory
make: *** [fish1.o] Error 1
ERROR: compilation failed for package ‘classInt’
* removing ‘/Users/sherrymukim/anaconda3/lib/R/library/classInt’
Warning in install.packages :
  installation of package ‘classInt’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/p9/6qp4xp2536jdmxd8qkzkhp7m0000gn/T/RtmpENRNpn/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done`

Hi, I noticed that I have x86_64-apple-darwin15.5.0-gfortran but not x86_64-apple-darwin13.4.0-gfortran which is needed to install "ClassInt" package in R 3.4.2 on mac os 10.13.2. Any suggestions?

Please do listen to what you are asked to do. Install binary only, or explain why you are still trying to install from source on a broken system. If you really wish to install from source, do follow the advice on the pages given, such as https://cran.r-project.org/bin/macosx/tools. This explains that Fortran from Apple is terminally broken, and gives remedies.

From this thread: https://stat.ethz.ch/pipermail/r-sig-mac/2018-March/012684.html you'll see that many others are having difficulties at the moment. Ensure that you are really installing binary, and visit the package pages on CRAN to ensure that all the packages the target package uses are installed in updated form. A lot of the difficulties seem to have come from Apple's bipolar issue (they are dreadfully lax on security, so obfuscate by enforcing costly certification on the installation of third-party software as if wasn't to blame itself - recall the no-password root login scandal).

@sagar-m if you use the recommended R for mac, everything will work out of the box. If you really want to use the anaconda version of R, you better ask your question over there, this is a problem with their setup.

@jeroen that was an excellent suggestion. I do have R for mac, but because I use Anaconda for spyder (python), and they have R studio too, thus I was using it. I was able to download sf (binary), and "ClassInt" (source) using R for mac. Thank you very much.

@rsbivand I was able to download sf (binary), and "ClassInt" (source) using R for mac. Thank you very much. In this process, I learnt many new things.

Please do listen to what you are asked to do. Install binary only, or explain why you are still trying to install from source on a broken system. If you really wish to install from source, do follow the advice on the pages given, such as https://cran.r-project.org/bin/macosx/tools. This explains that Fortran from Apple is terminally broken, and gives remedies.

This person is the most unhelpful, unknowledgeable... I'll leave out colorful language... person I've had the misfortunate of coming across on here. I know this is an old thread and I'm sure you've moved on but for anyone else, this worked for me:

(After installing units) To install classInt for mac:
Go to: https://cran.r-project.org/bin/macosx/tools/
Then: download and install "gfortran-6.1.pkg (OS X 10.11+, signed, 64-bit)"
When that's done go to: https://github.com/r-spatial/sf and follow the instructions for mac OR
Run this in RStudio: install.packages("sf", configure.args = "--with-proj-lib=/usr/local/lib/")

@v-ca please do respect the code of conduct of this repo.

@edzer nothing I said violated a code of conduct, and you may want to reprimand rsbivand, unless you're ok with how that ...gentleman... spoke to a user just trying to get help with something they obviously were having trouble with.

Was this page helpful?
5 / 5 - 1 ratings

Related issues

gregmacfarlane picture gregmacfarlane  Â·  4Comments

jsta picture jsta  Â·  4Comments

kendonB picture kendonB  Â·  3Comments

happyshows picture happyshows  Â·  3Comments

kendonB picture kendonB  Â·  4Comments