Installing rgdal - backdate rgdal version versus update gdal version, and how?

懵懂的女人 提交于 2021-02-10 15:59:59

问题


Two part question:

1) Like the person who asked this question (rgdal won't install on AWS RStudio AMI), I'm running into problems installing the rgdal package on R running on Ubuntu 16.04. The package wants GDAL 1.11.4 or later, and Synaptic Package manager is only offering GDAL 1.11.3.

The solution offered on the above question is to install an older version of rgdal from the archive. On the other hand, the answer given to this older question (Trouble getting latest version of GDAL on ubuntu running R) is to install a more recent version of GDAL from ubuntu-unstable.

Do both of these approaches work?

2) What are the steps required for each approach (or the approach that works if they don't both work)?


回答1:


What finally worked for me was trying to install an earlier version (v1.2-20) of rgdal that was compatible with gdal 1.11.3.

I was able to identify the correct version of rgdal using the documentation page here: https://www.rdocumentation.org/packages/rgdal/versions/1.2-20

Then I used the devtools package to install the correct version:

require(devtools)
install_version("rgdal", version="1.2-20")

This page has helpful information on installation of earlier versions of R packages: https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages

I attempted installing more recent versions of gdal both from source and with my package manager but continued to get various errors when I got to the step of trying to install rgdal.

What I don't know is why I kept getting errors when trying to work with gdal upgrades.



来源:https://stackoverflow.com/questions/51749860/installing-rgdal-backdate-rgdal-version-versus-update-gdal-version-and-how

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!