[R-sig-Geo] still having trouble with rgdal, please
Roger.Bivand at nhh.no
Thu Apr 14 20:47:31 CEST 2016
On Thu, 14 Apr 2016, Hodgess, Erin wrote:
> First of all, thanks to Roger Bivand for his great suggestions! I am
> making gradual progress.
> However, not all is well yet. One of my files from the gdal still seems
> to be missing:
and note that while you as non-super-user cannot use ldconfig to tell the
system to look in the right place for libgdal.so (it was found during
compilation and linking), you can set the environment
variable LD_LIBRARY_PATH despite the weaknesses that this has compared to
using ldconfig as super user. Running Sys.getenv("LD_LIBRARY_PATH") in R
shows you that R sets it up for its own purposes anyway (mostly for the
Java runtime engine).
Hope this helps,
>> install.packages("rgdal",lib="/work/01260/ehodgess/Rlibs",configure.args=c('--with-gdal-config=/work/01260/ehodgess/gdal/bin/gdal-config --with-proj-include=/work/01260/ehodgess/proj4/include --with-proj-lib=/work/01260/ehodgess/proj4/lib'),depen=TRUE)
> trying URL 'http://cran.revolutionanalytics.com/src/contrib/rgdal_1.1-8.tar.gz'
> Content type 'application/octet-stream' length 1649879 bytes (1.6 MB)
> downloaded 1.6 MB
> * installing *source* package 'rgdal' ...
> ** package 'rgdal' successfully unpacked and MD5 sums checked
> configure: CC: gcc -std=gnu99
> configure: CXX: g++
> configure: rgdal: 1.1-8
> checking for /usr/bin/svnversion... yes
> configure: svn revision: 616
> configure: gdal-config set to /work/01260/ehodgess/gdal/bin/gdal-config
> checking gdal-config exists... yes
> checking gdal-config executable... yes
> checking gdal-config usability... yes
> configure: GDAL: 2.0.2
> checking GDAL version >= 1.6.3... yes
> configure: experimental conditional use of GDAL2
> a bunch of good stuff....
> g++ -shared -L/usr/local/lib64 -o rgdal.so OGR_write.o gdal-bindings.o init.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o -L/work/01260/ehodgess/gdal/lib -lgdal -L/work/01260/ehodgess/proj4/lib -lproj
> installing to /work/01260/ehodgess/Rlibs/rgdal/libs
> ** R
> ** data
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** installing vignettes
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared object '/work/01260/ehodgess/Rlibs/rgdal/libs/rgdal.so':
> libgdal.so.20: cannot open shared object file: No such file or directory
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing '/work/01260/ehodgess/Rlibs/rgdal'
> The downloaded source packages are in
> Warning message:
> In install.packages("rgdal", lib = "/work/01260/ehodgess/Rlibs", :
> installation of package 'rgdal' had non-zero exit status
>> system("echo $PATH")
> So it's saying that libgdal.so.20 is not found. However, it is in gdal/lib, which is in the path. (See last line).
> Is there something else that I should be putting into the install.packages function, please? I've tried all kinds of things (putting a copy of libgdal.so.20 into Rlibs, etc.), but no good.
> Erin M. Hodgess, Ph.D.
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgesse at uhd.edu<mailto:hodgesse at uhd.edu>
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo