[R-sig-Geo] Problems with installing rgdal on Ubuntu "checking gdal: linking with --libs only... no"

Tomislav Hengl tom.hengl at gmail.com
Wed Aug 3 22:44:26 CEST 2016


Hi Roger,

I am sorry to bother you with this. I have reinstalled R on my server 
(actually MRO) and I have been stuck now trying to install rgdal 
(constantly getting "configure: Install failure: compilation and/or 
linkage problems. configure: error: GDALAllRegister not found in 
libgdal."). I've looked at numerous posts 
(http://stackoverflow.com/questions/34442010/r-cannot-install-rgdal-package-on-ubuntu-14-04) 
but I do not see where the problem comes from.

Thank you!

Here is my existing GDAL installation:

$ gdal-config --version
2.1.0
$ proj
Rel. 4.9.2, 08 September 2015
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

$ ldd /usr/lib64/MRO-3.3.0/R-3.3.0/lib/R/bin/exec/R
         linux-vdso.so.1 =>  (0x00007ffd9098e000)
         libR.so => not found
         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007f8cebcb3000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8ceb8e9000)
         /lib64/ld-linux-x86-64.so.2 (0x000055aff5b57000)


 > install.packages("rgdal")
Installing package into ‘/home/tom/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 
'https://mran.microsoft.com/snapshot/2016-06-01/src/contrib/rgdal_1.1-10.tar.gz' 

Content type 'application/octet-stream' length 1653393 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-10
checking for /usr/bin/svnversion... yes
configure: svn revision: 622
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.1.0
checking GDAL version >= 1.6.3... yes
configure: experimental conditional use of GDAL2
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::Href::Parse(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::ReadKmlAndGetPath(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >*) const'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::OpenFromString(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmldom::SerializePretty[abi:cxx11](boost::intrusive_ptr<kmldom::Element> 
const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmldom::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&, std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::ReadFile(char const*, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >*) const'
collect2: error: ld returned 1 exit status
/usr/bin/ld: warning: libproj.so.10, needed by 
/usr/local/lib/libgdal.so, may conflict with libproj.so.9
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::Href::Parse(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::ReadKmlAndGetPath(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >*) const'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::OpenFromString(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmldom::SerializePretty[abi:cxx11](boost::intrusive_ptr<kmldom::Element> 
const&)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmldom::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&, std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)'
/usr/local/lib/libgdal.so: undefined reference to 
`kmlengine::KmzFile::ReadFile(char const*, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >*) const'
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/tom/R/x86_64-pc-linux-gnu-library/3.3/rgdal’



More information about the R-sig-Geo mailing list