1

To get a PostgreSQL/PostGIS setup working on my Windows 10 machine I had to manually install GDAL using these instructions:

https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows

After that, when I load the sf library I get this warning message:

> library(sf)
Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
Warning messages:
1: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

2: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

3: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

4: In CPL_gdal_init() :
  GDAL Error 1: Can't load requested DLL: C:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.

Can anyone recommend a way to remove these warnings or explain what I happened to do to create this conflict?

  • Have you installed rgdal as well? You may want to try this. It provides a lightweight installation that should not interfere with your other GDAL version. – Jeffrey Evans May 23 at 18:15
  • Possibly. However I couldn't use rgdal with my PostGIS installation so that sort of makes the point moot no? – boshek May 23 at 18:23
  • Did you check the directory to see if the .dlls exist? – enolan May 23 at 19:38
  • @enolan they are there. That would have been useful info to include. Do you think I could safely delete them? Not using MSSQL for anything. – boshek May 23 at 19:47
  • It might be old school but maybe try re-registering them? start->run->type regsvr32 "path to dll" – enolan May 23 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.