我正在尝试在Ubuntu 18.04上安装rgdal。
我现在遇到的错误消息是:
List<User>
在尝试在R中安装“ 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’
不确定我还应该尝试什么。预先谢谢你!
答案 0 :(得分:2)
您首先必须安装Dependend库。 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/')\""