【发布时间】:2021-06-23 08:22:30
【问题描述】:
我正在尝试在运行 Linux Mint 20.1 (Ubuntu 20.04) 的 Linux 计算机上的 R 4.0.4 上安装 R 包 rgdal。我收到以下错误:
>install.packages('rgdal')
Installing package into ‘/home/brant/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.5-23.tar.gz'
Content type 'application/x-gzip' length 4393536 bytes (4.2 MB)
==================================================
downloaded 4.2 MB
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /usr/lib/R
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: CFLAGS: -g -O2 -fdebug-prefix-map=/build/r-base-fhxXXR/r-base-4.0.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
configure: CPPFLAGS:
configure: CXXFLAGS: -g -O2 -fdebug-prefix-map=/build/r-base-fhxXXR/r-base-4.0.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
configure: LDFLAGS: -Wl,-Bsymbolic-functions -Wl,-z,relro
configure: LDFLAGS: -Wl,-Bsymbolic-functions -Wl,-z,relro
configure: CXX11 is: g++, CXX11STD is: -std=gnu++11
configure: CXX is: g++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-23
checking for /usr/bin/svnversion... no
configure: svn revision: 1121
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.2.1
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... no
checking GDAL: linking with --libs and --dep-libs... no
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libgeos-3.9.0.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libgeos-3.9.0.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `std::logic_error::logic_error(std::logic_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so.1: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/libgdal.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libgeos-3.9.0.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libgeos-3.9.0.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libdap.so: undefined reference to `std::logic_error::logic_error(std::logic_error&&)@GLIBCXX_3.4.26'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/x86_64-linux-gnu/libheif.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
/home/linuxbrew/.linuxbrew/bin/ld: /usr/lib/libgdal.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
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/brant/R/x86_64-pc-linux-gnu-library/4.0/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpyhzVNG/downloaded_packages’
有人对正在发生的事情以及如何解决有任何建议吗?我在 Linux 方面不是很有经验,并尝试过旧帖子中的一些东西,但这些都没有奏效。
【问题讨论】:
标签: r linux-mint ubuntu-20.04 rgdal