简体   繁体   中英

rgeos package installation error on linux [R]

I'm trying to install the package rgeos on linux. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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