问题
I've installed geos, proj-4.8.0 and gdal-1.9.2, yet, after installing the R package rgeos, rgdal fails to install.
Here is a look at my home directory:
. . . and the error I get running install.packages("rgdal", type="source")
:
** building package indices ** installing vignettes ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/mainstorage/michaeld/R/x86_64-redhat-linux-gnu-library/3.1/rgdal/libs/rgdal.so': libgdal.so.1: cannot open shared object file: No such file or directory Error: loading failed Execution halted ERROR: loading failed * removing ‘/mainstorage/michaeld/R/x86_64-redhat-linux-gnu-library/3.1/rgdal’
The downloaded source packages are in ‘/tmp/Rtmpt51iFG/downloaded_packages’ Warning message: In install.packages("rgdal", type = "source") : installation of package ‘rgdal’ had non-zero exit status
I infer that this error has something to do with a dependent library. . . but that is all I gather.
I should mention that running sudo yum install libgdal1 libgdal1-dev libgeos libgeos-dev
as suggested here yields the following:
No package libgdal1 available. No package libgdal1-dev available. Package geos-3.4.2-1.3.amzn1.x86_64 already installed and latest version No package libgeos-dev available.
So, perhaps the better question is how do I install these dev
packages?
Thanks for any direction.
回答1:
You probably need to update the dynamic library cache, using ldconfig
as superuser.
Alternatively, rather than building the packages from source, you can enable the Extra Packages for Enterprise Linux (EPEL) repository.
来源:https://stackoverflow.com/questions/28863092/rgdal-package-installation-on-amazon-linux-ami