Error when installing SF in R double free or corruption

Viewed 1116

The problem

I was trying to install SF again in my Ubuntu 18.04 machine, because it was giving me some problems. Since I wanted to start everything clean I tried the following:

remove.packages("sf")
install.packages("sf")

This however resulted in the following error.

checking GDAL: checking whether PROJ is available fur running:... double free or corruption (out)
./configure: line 3625: 20789 Aborted                 (core dumped) ./gdal_proj
no
configure: error: OGRCoordinateTransformation() does not return a coord.trans: PROJ not available?
ERROR: configuration failed for package ‘sf’
* removing ‘/home/derek/R/x86_64-pc-linux-gnu-library/3.6/sf’

When I saw the message double free or corruption (out) I looked and realized it is a c++ problem as shown in this link and this link. But even when I know the problem is suposed to be in PROJ, I don't even know where to start.

What I have tried.

I tried to reinstall rgdal to see if that magically fixed the problem doing the same as above

remove.packages("rgdal")
install.packages("rgdal")

which led to a similar result

** testing if installed package can be loaded from temporary location
double free or corruption (!prev)
Aborted (core dumped)

I don't know how to get to PROJ through the terminal.

Any help would be greatly appreciated

Update

Just an update, after the comment from Nate. I reinstalled PROJ, it keeps the same error, just to show you more of the error, this is the message:

checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... double free or corruption (out)
./configure: line 3625: 22371 Aborted                 (core dumped) ./gdal_proj
no
configure: error: OGRCoo

So it says that PROJ is available, but there is a corruption, I am not sure how to solve that, should I unistall something?

0 Answers
Related