gpt4 book ai didi

r - 在 ubuntu 18.04 上安装 rgdal

转载 作者:行者123 更新时间:2023-12-04 18:28:57 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 18.04 上安装 rgdal。

我现在收到的错误消息是:

configure: R_HOME: /usr/lib/R
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-4
checking for /usr/bin/svnversion... no
configure: svn revision: 833
checking for gdal-config... /home/kchen/anaconda3/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.3.3
checking C++11 support for GDAL >= 2.3.0... yes
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
/usr/lib/x86_64-linux-gnu/libdapserver.so.7: undefined reference to `uuid_generate@UUID_1.0'
/usr/lib/x86_64-linux-gnu/libdapserver.so.7: undefined reference to `uuid_unparse@UUID_1.0'
collect2: error: ld returned 1 exit status
/home/kchen/anaconda3/lib/libcurl.so: undefined reference to `SSL_CTX_set_ciphersuites@OPENSSL_1_1_1'
/home/kchen/anaconda3/lib/libcurl.so: undefined reference to `SSL_CTX_set_post_handshake_auth@OPENSSL_1_1_1'
/home/kchen/anaconda3/lib/libcurl.so: undefined reference to `SSL_CTX_set_keylog_callback@OPENSSL_1_1_1'
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’

在尝试在 R 中安装“rgdal”之前,我做了以下操作
$ sudo apt-get upgrade libgdal-dev
$ sudo apt-get upgrade libproj-dev
$ sudo apt-get upgrade gdal-bin

不知道我还应该尝试什么。先感谢您!

最佳答案

您首先必须安装依赖库。 R 也必须 >3.3.0。

sudo apt-get install libgdal1-dev libproj-dev

如果这不起作用,请确保您安装了 C++
g++: command not found

从控制台而不是在 R 中安装 R-Packages 也是一个更好的解决方案,因为机器上的每个用户都可以访问该包。否则它只会在您的个人图书馆中。
sudo su - -c "R -e \"install.packages('rgdal', repos='http://cran.rstudio.com/')\""

关于r - 在 ubuntu 18.04 上安装 rgdal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56445865/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com