Error: package or namespace load failed

Hey team, I'm currently running with a project and need to get miles between zipcodes I'll be using zipcodeR and geosphere - but when calling 'library(zipcodeR)' I'm getting the following error message:

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

I've tried installing rgdal but it also returns the following message:

configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rgdal’
    Warning in install.packages :
    installation of package ‘rgdal’ had non-zero exit status

Have you guys encountered any issue similiar to this one?

This is asking you to install rgdal

install.packages("rgdal")

Have in mind that rgdal also has system dependencies, from the documentation:

PROJ (>= 4.8.0, Download — PROJ 9.0.0 documentation) and GDAL (>= 1.11.4, Download — GDAL documentation), with versions either (A) PROJ < 6 and GDAL < 3 or (B) PROJ >= 6 and GDAL >= 3. For degraded PROJ 6 or 7 and GDAL < 3, use the configure argument '--with-proj_api="proj_api.h"'.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.