Search code examples
rgdalrgdal

Trouble installing rgdal package in R 3.3.0


Trying to install rgdal package in R 3.3.0 on Ubuntu 16.04 using install.packages("rgdal") and getting the following error:

In file included from /usr/local/lib/R/site-library/sp/include/sp.h:13:0, from rgdal.h:15, from OGR_write.cpp:11: /usr/share/R/include/S.h:41:3: error: #error S.h can not be used from C++ code: use R.h instead # error S.h can not be used from C++ code: use R.h instead

anyone else seen this and know how to fix it? Or do we need to wait for a fix to the rgdal package itself?


Solution

  • Wild guess: you could try to reinstall sp before, just to have any dependency up-to-date.