简体   繁体   English

linux上的rgeos包安装错误[R]

[英]rgeos package installation error on linux [R]

I'm trying to install the package rgeos on linux. 我正在尝试在linux上安装软件包rgeos。 I get the following error: 我收到以下错误:

system("sudo apt-get update")
system("sudo apt install libgdal-dev -y")
install.packages("rgeos")
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’

I have already install the dev libgdal and it returns the "already installed" info if I try to run the sudo again. 我已经安装了dev libgdal,如果我再次尝试运行sudo,它会返回“已经安装”的信息。

How can I fix this? 我怎样才能解决这个问题? Thanks in advance! 提前致谢!

It is a bug, you could use this to install lower stable version. 这是一个错误,您可以使用它来安装较低的稳定版本。

install.packages("devtools")
library(devtools)
install_version("rgeos", version = "0.3-28")

After this code all should be fine. 这段代码之后一切都应该没问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM