8

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.

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
Derek Corcoran
  • 3,930
  • 2
  • 25
  • 54
  • do you have [the `PROJ` lib installed](https://proj.org/install.html#debian) on your system? – Nate Mar 21 '20 at 20:56
  • Yes I do, I just checked just in case – Derek Corcoran Mar 22 '20 at 21:35
  • @Nate I added an Update, any help would be awesome – Derek Corcoran Mar 23 '20 at 00:36
  • 2
    Hmm, hard to say. I've had sf install problem before but have fixed it by upgrading/reinstalling the system libs. I don't think the R `gdal` library is releated. Maybe start fresh and [reinstall per the docs](https://github.com/r-spatial/sf#ubuntu), sorry I don't have a better suggestion – Nate Mar 23 '20 at 02:03
  • 2
    same exact problem here, any updates on this? tried reinstalling per the docs, still same error – cengstro Aug 05 '20 at 14:30
  • 3
    Hey @cengstro I actually fixed it, to be honest, I am not completely sure how it was fixed, I was about to format my notebook (Ubuntu 18.04) and then did an sudo-apt get dist-upgrade, and the next time I restarted my computer everything was fine – Derek Corcoran Aug 05 '20 at 15:48

0 Answers0