11

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!

7
  • This might help stackoverflow.com/a/49181048 Commented Oct 22, 2018 at 3:42
  • 1
    Same here on ubuntu 16.04 / R 3.5.1 and the solution in the thread linked by Tung didn't help, everything was already installed. Commented Oct 22, 2018 at 11:37
  • 1
    Looks like it is something specific to 0.4-1 version of rgeos as 0.3-28 is running fine here but update cannot be done because of this issue. Commented Oct 22, 2018 at 11:59
  • If it's an archive issue I'll try grabbing rgeos archive from CRAN via devtools::install_version Commented Oct 23, 2018 at 0:11
  • 5
    It's a bug, developer has replied on this thread on the R-sig-geo mailing list. r-sig-geo.2731867.n2.nabble.com/… Commented Oct 23, 2018 at 21:58

1 Answer 1

13

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.