Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

**Installation** on Mac OS #149

Closed
mtennekes opened this issue Nov 7, 2017 · 12 comments
Closed

**Installation** on Mac OS #149

mtennekes opened this issue Nov 7, 2017 · 12 comments
Labels

Comments

@mtennekes
Copy link
Member

Let's bundle all issues related to installation problems of Mac OS here. I would like to add an installation procedure to the homepage (README.md) and keep it up to date.

See also previous issues #120 #145, which I'll close.

@GeraldCNelson
Copy link

Here's another Mac installation problem.

> install_github("mtennekes/tmaptools")
Downloading GitHub repo mtennekes/tmaptools@master
from URL https://api.github.com/repos/mtennekes/tmaptools/zipball/master
Installing tmaptools
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/bv/881_rsvd2kv83c13yywwc_xh0000gn/T/RtmpOuHJqy/devtools1701159e059e4/mtennekes-tmaptools-2f9870e'  \
  --library='/Users/gcn/Library/R/3.4/library' --install-tests 

* installing *source* package ‘tmaptools’ ...
** R
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Users/gcn/Library/R/3.4/library/classInt/libs/classInt.so':
  dlopen(/Users/gcn/Library/R/3.4/library/classInt/libs/classInt.so, 6): Symbol not found: ___addtf3
  Referenced from: /usr/local/lib/libquadmath.0.dylib
  Expected in: /usr/local/lib/libgcc_s.1.dylib
 in /usr/local/lib/libquadmath.0.dylib
ERROR: lazy loading failed for package ‘tmaptools’
* removing ‘/Users/gcn/Library/R/3.4/library/tmaptools’
* restoring previous ‘/Users/gcn/Library/R/3.4/library/tmaptools’
Installation failed: Command failed (1)

I'm using R 3.4.3, on Mac OS High Sierra

@muschellij2
Copy link

Depending on you install, you may have to do:

export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib/gcc/7/

in your ~/.bash_profile, but you should likely otool -L. See https://superuser.com/questions/282450/where-do-i-set-dyld-library-path-on-mac-os-x-and-is-it-a-good-idea

@Nowosad Nowosad closed this as completed May 1, 2018
@mrspatbile
Copy link

Could someone please explain exactly was is needed in order to solve the tmap crash on mac? I have tried many of the suggestions on this post (export DYLD on bash, edit bash, checking otool), unsuccessfully. As it is not clear what one should exactly do in order to solve tmap problem, I am clueless. As the example is related to mysql, it could be really helpful if someone posted the solution for this specifc problem.

In order to reproduce error, any tm_ function on qtm() will crash R. But here is an example:
library(tmap)
data(Europe)
qtm(Europe)

screen shot 2018-05-09 at 23 21 34

Here is what I have tried:
#1 - edited .bash file (last 4 lines on 9/May)
screen shot 2018-05-09 at 23 13 45

#2 - Run otools - but I dont know exactly what I was supposed to do with it. The example is on mysql
screen shot 2018-05-09 at 23 14 54

#3 - Done the following on home directory
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib/gcc/7/
So this is what I get using echo
screen shot 2018-05-09 at 23 36 20

My library path and system specification

.libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS 10.13.4

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.3.2 yaml_2.1.14

Thank you.

@mrspatbile
Copy link

I just understood part of what I am supposed to do with otool. I got the following result. Maybe someone can help me to figure out what to do now.

otool -L /Applications/RStudio.app/Contents/MacOS/RStudio

/Applications/RStudio.app/Contents/MacOS/RStudio:
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.32.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 534.53.11)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.24.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

@mtennekes mtennekes reopened this Aug 8, 2018
@Nowosad Nowosad pinned this issue Mar 9, 2019
@mtennekes mtennekes unpinned this issue Dec 16, 2020
@mtennekes mtennekes pinned this issue Dec 16, 2020
@tylerhoecker
Copy link

tylerhoecker commented Sep 27, 2021

I am having an issue where tmap fails to load in R on the first attempt and crashed my R session on the second attempt.

I installed tmap for the first time on a Macbook Pro (MacOS 10.13.6) where it was not previously installed. I have many other geospatial packages including rgdal, sf, etc. installed. When I run install.packages('tmap') it appears to install successfully. When I try to load the package, using library(tmap) I first get this error:

Error: package or namespace load failed for ‘tmap’: .onLoad failed in loadNamespace() for 'lwgeom', details: call: CPL_set_data_dir(prj) error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'

If I run library(tmap) again, the session aborts. In the past I have found that changing my Rcpp installation has negative cascading impacts on other packages (ie, other packages begin to fail). I have read through this thread, none of the above issues seem to mirror my own and the solutions seem complex. Any suggestions?

R version info:
platform x86_64-apple-darwin17.0 arch x86_64 os darwin17.0 system x86_64, darwin17.0 status major 4 minor 0.3 year 2020 month 10 day 10 svn rev 79318 language R version.string R version 4.0.3 (2020-10-10) nickname Bunny-Wunnies Freak Out

@tylerhoecker
Copy link

I may have solved this issue by re-installing Rcpp.

@mauritsvzb
Copy link

mauritsvzb commented Dec 11, 2021

I too am having an issue when trying to install tmap from the GitHub repo. Any suggestions how to solve this? I had the tmap package from CRAN installed previously without deleting it. I'm running MacOS Catalina and latest versions of R and RStudio, if that helps.

Thank you

> install_github("r-tmap/tmap")
Downloading GitHub repo r-tmap/tmap@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                             
2: CRAN packages only              
3: None                            
4: withr  (2.4.2  -> 2.4.3 ) [CRAN]
5: glue   (1.5.0  -> 1.5.1 ) [CRAN]
6: terra  (1.4-11 -> 1.4-22) [CRAN]
7: xfun   (0.27   -> 0.28  ) [CRAN]
8: digest (0.6.28 -> 0.6.29) [CRAN]
9: raster (3.5-2  -> 3.5-9 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
withr  (2.4.2  -> 2.4.3 ) [CRAN]
glue   (1.5.0  -> 1.5.1 ) [CRAN]
terra  (1.4-11 -> 1.4-22) [CRAN]
xfun   (0.27   -> 0.28  ) [CRAN]
digest (0.6.28 -> 0.6.29) [CRAN]
raster (3.5-2  -> 3.5-9 ) [CRAN]
Installing 6 packages: withr, glue, terra, xfun, digest, raster

  There is a binary version available but the source version is later:
       binary source needs_compilation
raster  3.5-2  3.5-9              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) YesYes
Error: Failed to install 'tmap' from GitHub:
  Unrecognized response “YesYes”
> install_github("r-tmap/tmap")
Downloading GitHub repo r-tmap/tmap@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                             
2: CRAN packages only              
3: None                            
4: withr  (2.4.2  -> 2.4.3 ) [CRAN]
5: glue   (1.5.0  -> 1.5.1 ) [CRAN]
6: terra  (1.4-11 -> 1.4-22) [CRAN]
7: xfun   (0.27   -> 0.28  ) [CRAN]
8: digest (0.6.28 -> 0.6.29) [CRAN]
9: raster (3.5-2  -> 3.5-9 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
withr  (2.4.2  -> 2.4.3 ) [CRAN]
glue   (1.5.0  -> 1.5.1 ) [CRAN]
terra  (1.4-11 -> 1.4-22) [CRAN]
xfun   (0.27   -> 0.28  ) [CRAN]
digest (0.6.28 -> 0.6.29) [CRAN]
raster (3.5-2  -> 3.5-9 ) [CRAN]
Installing 6 packages: withr, glue, terra, xfun, digest, raster

  There is a binary version available but the source version is later:
       binary source needs_compilation
raster  3.5-2  3.5-9              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/contrib/4.1/withr_2.4.3.tgz'
Content type 'application/x-gzip' length 213900 bytes (208 KB)
==================================================
downloaded 208 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/glue_1.5.1.tgz'
Content type 'application/x-gzip' length 149583 bytes (146 KB)
==================================================
downloaded 146 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/terra_1.4-22.tgz'
Content type 'application/x-gzip' length 96919656 bytes (92.4 MB)
==================================================
downloaded 92.4 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/xfun_0.28.tgz'
Content type 'application/x-gzip' length 371454 bytes (362 KB)
==================================================
downloaded 362 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/digest_0.6.29.tgz'
Content type 'application/x-gzip' length 298460 bytes (291 KB)
==================================================
downloaded 291 KB


The downloaded binary packages are in
	/var/folders/cb/gj9pv0x5429dvzrnbqk9rlw40000gn/T//RtmppkjfJp/downloaded_packages
installing the source package ‘raster’

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

* installing *source* package ‘raster’ ...
** package ‘raster’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RasterModule.cpp -o RasterModule.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c aggregate.cpp -o aggregate.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bilinear.cpp -o bilinear.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c broom.cpp -o broom.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c cellRowCol.cpp -o cellRowCol.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c clamp.cpp -o clamp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c distance.cpp -o distance.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c edge.cpp -o edge.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c focal_fun.cpp -o focal_fun.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c focal_get.cpp -o focal_get.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c focal_sum.cpp -o focal_sum.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c geodesic.c -o geodesic.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c getPolygons.cpp -o getPolygons.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c layerize.cpp -o layerize.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c memory.cpp -o memory.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c modal.cpp -o modal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c ppmin.cpp -o ppmin.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c raster_aggregate.cpp -o raster_aggregate.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c raster_distance.cpp -o raster_distance.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rasterize.cpp -o rasterize.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c reclass.cpp -o reclass.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c terrain.cpp -o terrain.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c util.cpp -o util.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c xyCell.cpp -o xyCell.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o raster.so RasterModule.o RcppExports.o aggregate.o bilinear.o broom.o cellRowCol.o clamp.o distance.o edge.o focal_fun.o focal_get.o focal_sum.o geodesic.o getPolygons.o layerize.o memory.o modal.o ppmin.o raster_aggregate.o raster_distance.o rasterize.o reclass.o terrain.o util.o xyCell.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-raster/00new/raster/libs
** R
** inst
** byte-compile and prepare package for lazy loading
in method for ‘brick’ with signature ‘x="kasc"’: no definition for class “kasc”
in method for ‘brick’ with signature ‘x="grf"’: no definition for class “grf”
in method for ‘coerce’ with signature ‘"STFDF","RasterBrick"’: no definition for class “STFDF”
in method for ‘coerce’ with signature ‘"STSDF","RasterBrick"’: no definition for class “STSDF”
in method for ‘coerce’ with signature ‘"asc","RasterLayer"’: no definition for class “asc”
in method for ‘coerce’ with signature ‘"RasterLayer","asc"’: no definition for class “asc”
in method for ‘coerce’ with signature ‘"kasc","RasterBrick"’: no definition for class “kasc”
in method for ‘coerce’ with signature ‘"kasc","RasterStack"’: no definition for class “kasc”
in method for ‘coerce’ with signature ‘"kde","RasterLayer"’: no definition for class “kde”
in method for ‘coerce’ with signature ‘"grf","RasterBrick"’: no definition for class “grf”
in method for ‘coerce’ with signature ‘"grf","RasterLayer"’: no definition for class “grf”
in method for ‘extent’ with signature ‘x="bbox"’: no definition for class “bbox”
in method for ‘extent’ with signature ‘x="sf"’: no definition for class “sf”
in method for ‘extract’ with signature ‘x="Raster",y="sf"’: no definition for class “sf”
in method for ‘mask’ with signature ‘x="Raster",mask="sf"’: no definition for class “sf”
in method for ‘raster’ with signature ‘x="sf"’: no definition for class “sf”
in method for ‘raster’ with signature ‘x="kasc"’: no definition for class “kasc”
in method for ‘raster’ with signature ‘x="asc"’: no definition for class “asc”
in method for ‘raster’ with signature ‘x="kde"’: no definition for class “kde”
in method for ‘raster’ with signature ‘x="grf"’: no definition for class “grf”
in method for ‘rasterize’ with signature ‘x="sf",y="Raster"’: no definition for class “sf”
Creating a generic function for ‘rowSums’ from package ‘base’ in package ‘raster’
Creating a generic function for ‘colSums’ from package ‘base’ in package ‘raster’
in method for ‘setValues’ with signature ‘x="RasterLayerSparse"’: no definition for class “RasterLayerSparse”
in method for ‘stack’ with signature ‘x="kasc"’: no definition for class “kasc”
** help
*** installing help indices
** 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 (raster)

The downloaded source packages are in
	‘/private/var/folders/cb/gj9pv0x5429dvzrnbqk9rlw40000gn/T/RtmppkjfJp/downloaded_packages’
✓  checking for file ‘/private/var/folders/cb/gj9pv0x5429dvzrnbqk9rlw40000gn/T/RtmppkjfJp/remotesd886a95975b/r-tmap-tmap-1204aaa/DESCRIPTION’ (464ms)
─  preparing ‘tmap’:
✓  checking DESCRIPTION meta-information ...
Error: Failed to install 'tmap' from GitHub:
  444 arguments passed to .Internal(inherits) which requires 3

@muschellij2
Copy link

That's likely needs a restart of R, assuming you're doing that in RStudio. Try to install from GitHub with no updates of other packages.

@mauritsvzb
Copy link

That's likely needs a restart of R, assuming you're doing that in RStudio. Try to install from GitHub with no updates of other packages.

That worked, thank you

@leima0521
Copy link

I am also having trouble installing tmap on macOS Monterey 12.0.1. It seems like something is wrong with the installation of terra. Thank you for your help in advance.

library(tmap)
Error: package or namespace load failed for ‘tmap’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘terra’

Then I tried to install terra and get this error message.

> install.packages("terra")
  There is a binary version available but the source version is later:
      binary source needs_compilation
terra 1.4-22 1.5-12              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘terra’

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

* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: clang -mmacosx-version-min=10.13
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/terra’
Warning in install.packages :
  installation of package ‘terra’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/lc/xvq839953fx8jr5wbgc93rvr0000gn/T/Rtmp5QM6Q8/downloaded_packages’

My R session info

R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7         compiler_4.1.2     pillar_1.6.4       RColorBrewer_1.1-2 base64enc_0.1-3    class_7.3-19      
 [7] tools_4.1.2        digest_0.6.29      viridisLite_0.4.0  lifecycle_1.0.1    tibble_3.1.6       png_0.1-7         
[13] pkgconfig_2.0.3    rlang_0.4.12       rstudioapi_0.13    DBI_1.1.2          crosstalk_1.2.0    parallel_4.1.2    
[19] fastmap_1.1.0      e1071_1.7-9        dplyr_1.0.7        generics_0.1.1     vctrs_0.3.8        htmlwidgets_1.5.4 
[25] classInt_0.4-3     leaflet_2.0.4.1    grid_4.1.2         tidyselect_1.1.1   glue_1.6.0         sf_1.0-5          
[31] R6_2.5.1           fansi_0.5.0        XML_3.99-0.8       purrr_0.3.4        magrittr_2.0.1     tmaptools_3.1-1   
[37] stars_0.5-5        leafsync_0.1.0     htmltools_0.5.2    ellipsis_0.3.2     units_0.7-2        dichromat_2.0-0   
[43] abind_1.4-5        assertthat_0.2.1   KernSmooth_2.23-20 utf8_1.2.2         proxy_0.4-26       lwgeom_0.2-8      
[49] crayon_1.4.2   

@DevianaWDewi
Copy link

DevianaWDewi commented Aug 18, 2022

I am really wondering about the step-by-step guidance in installing tmap for MacOS. I am using MacOS Monterey 12.3 and R version 4.2.1

Based on this guideline, to use tmap, installation for Mac & Linux users require additional (non-R) libraries (which are automatically installed for Windows users). In another post we would need to install some libraries: sp, rgdal, and raster with following steps:

  • Download GDAL complete
  • Download rgdal package
  • Install raster and sp

Questions:

  1. Is there any link to download the right version of rgdal for Mac? I have tried each version of rdgal: rgdal_1.2-16.tgz, rgdal_1.5-30.tgz and rgdal_1.5-32.tgz only with the same warning/error message:

Warning in install.packages :
package ‘~/Desktop/rgdal_1.5-30.tgz’ is not available for this version of R

  1. Is there any step-by-step guidance in installing tmap for MacOS users who are new to spatial data visualization (including which mandatory library package or software needs to be installed first before using tmap). I have installed tmap, but the tmap package still cannot function.

Any leads would be much appreciated! Thank you.

@GeraldCNelson
Copy link

GeraldCNelson commented Aug 18, 2022 via email

@olivroy olivroy unpinned this issue Apr 11, 2024
@olivroy olivroy pinned this issue Apr 11, 2024
@olivroy olivroy closed this as completed Aug 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants