Closed tbradley1013 closed 2 years ago
rgdal is shortly to be retired latest end 2023, no active maintenance other than on systems the maintainer has access to can be expected (Fedora latest, Windows 10, macOS M1). Can you install sf on the same platform? If yes, simply step away from rgdal and rgeos now (if you are a developer).
rgdal is on R-forge, which is where you may access current source (see the CRAN page https://cran.r-project.org/package=rgdal, the canonical information source for the package). Since your system is not one I have access to, any attempt to patch might be by emailing diffs, or rather by checking out the SVN source, trying the patches locally, and emailing a diff when you succeed. I'll then check them, and if they do not break anything else on any other platform, perhaps include them.
One reason for wondering whether the root problem is not multiple installed PROJ or GDAL external software on your system is that rgdal and sf are checked quite regularly on PROJ < 6 and >=6, so this fix, for a broken PROJ distribution which forgot to include the proj_def.dat
file seven years ago, defined in R/AAA.R lines 88-92 and src/projectit.cpp lines 97-129. It might be time to drop the test, because PROJ.4 4.9.1 was released some time ago (march 2015, still listed at https://download.osgeo.org/proj/proj-4.9.1.tar.gz); since the release is still listed, maybe it is not yet time to drop it.
Thanks for the quick reply. For this particular application I am not the developer, but I have instructed the developer that they will need to update their application to use sf
rather than rgdal
.
To my knowledge, there is only one PROJ installation on the server. I uninstalled all pacakges identified by dpkg -l | grep proj
and dpkg -l | grep gdal
and then reinstalled them to no avail. At this point, I don't think I have the bandwidth to try to patch the package for Ubuntu 20.04, although I appreciate your openness to PR and helping me.
I will close this issue since upgrading to sf
should eliminate the issue. Thanks!
Please get back with an sf issue if that package does not install cleanly, or review existing issues concerning installation problems there. The same would apply for the terra package if your need for rgdal was as a package required by raster.
Hello,
I recently upgraded my ubuntu server from 16.04 to 20.04. The server is used to host RStudio Connect and as a result has multiple versions of R installed from source.
I am trying to install the
rgdal
package (v. 1.5-28) for R 4.1.1. However, every time I runinstall.packages("rgdal")
, I get the following error when it tries to test if the package can be loaded:I have dug a little into the source code for the package, and it looks like the error is occurring on line 107 of the AAA.R file in the .onAttach function for the package. I cloned the cran read-only github repo and put a bunch of
cat()
calls throughout the .onAttach function to see what values were being returned for these different checks. It looks like the value returned by thePROJis6ormore()
function is FALSE. Even though during the package installation checks it finds my proj installation which is currently version 6.3.1When this value is FALSE, it leaves the value of
"has_proj_def.dat"
in the.RGDAL_CACHE
as NULL. Then once it reaches line 107, this NULL value is rejected in the||
statement, causing the error that I am getting.I tried to upgrade my proj and gdal installations to the development server by running the following:
This upgraded me to PROJ version 8.2.0, however, I am still getting the same error when installing this package. I have tried to install it from multiple R installations and versions and I am getting the same error everywhere. I am not sure why the .OnAttach function isn't recognizing my PROJ installation when it is recognized during the package installation checks.
Any ideas or suggestions on how to resolve this issue would be greatly appreciated.