gpt4 book ai didi

r - 尝试安装 rgeos R 时找不到 -lgeos

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

我正在尝试安装 rgeos在 ubuntu 16.04 中运行的 R 3.5.1 中。当我跑

install.packages("rgeos")

我收到以下消息:
* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgeos: 0.4-1
checking for /usr/bin/svnversion... yes
configure: svn revision: 579
checking for geos-config... /usr/bin/geos-config
checking geos-config usability... yes
configure: GEOS version: 3.5.1
checking geos version at least 3.2.0... yes
checking geos-config clibs... yes
checking geos_c.h presence and usability... yes
checking geos: linking with libgeos_c... no
/usr/bin/ld: cannot find -lgeos
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: initGEOS_r not found in libgeos_c.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.5/rgeos’
Warning in install.packages :
installation of package ‘rgeos’ had non-zero exit status

我尝试安装地理空间库
sudo apt-get install binutils libproj-dev gdal-bin

但它没有帮助

任何帮助将不胜感激

最佳答案

R 3.5.1 也有同样的问题。这解决了问题

sudo apt install libgeos++-dev

关于r - 尝试安装 rgeos R 时找不到 -lgeos,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53042751/

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