Issue loading any package in R

500 views Asked by At

I have successfully installed the tmap package in RStudio version 1.2.1335.

However when I try to load it with the library(tmap) command I get this error message:

Error: package or namespace load failed for ‘tmap’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/raster/libs/raster.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/raster/libs/raster.so, 6): Symbol not found: _EXTPTR_PTR
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/raster/libs/raster.so
  Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
 in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/raster/libs/raster.so
 

I am having this issue with all packages (newly installed or old), and am unsure where to begin looking for the issue.

2

There are 2 answers

0
bellbyrne On BEST ANSWER

I resolved this issue by reinstalling R and RStudio

0
Tseng Chih Yu On

It sounds like you lost the package about 'raster'. Maybe you go to install it.