checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package 'sf'
When I try to install the 'sf' package. This problem shows. Is there any way to install in on the Linux server?
Below are my R environment.
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.7 (Maipo)
Matrix products: default
BLAS: /geode2/home/u100/wnchang/Carbonate/R3.6.1/lib64/R/lib/libRblas.so
LAPACK: /geode2/home/u100/wnchang/Carbonate/R3.6.1/lib64/R/lib/libRlapack.so
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] units_0.6-6 devtools_2.3.0 usethis_1.6.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 magrittr_1.5 pkgload_1.0.2 R6_2.4.1
[5] rlang_0.4.6 fansi_0.4.1 tcltk_3.6.1 tools_3.6.1
[9] pkgbuild_1.0.8 sessioninfo_1.1.1 cli_2.0.2 withr_2.2.0
[13] ellipsis_0.3.0 remotes_2.1.1 assertthat_0.2.1 digest_0.6.25
[17] rprojroot_1.3-2 crayon_1.3.4 processx_3.4.2 callr_3.4.3
[21] fs_1.4.1 ps_1.3.3 curl_4.3 testthat_2.3.2
[25] memoise_1.1.0 glue_1.4.1 compiler_3.6.1 desc_1.2.0
[29] backports_1.1.7 prettyunits_1.1.1
Hi,
Did you try to install gdal on your system ?
Looks like you need to build it from the source code:
https://gist.github.com/simondobner/f859b2db15ad65090c3c316d3c224f45
Hope it helps
Thanks for replying @dickoa
I already fixed the 'gdal-config' issue by loading the gdal, geos, and proj module.
Currently Loaded Modulefiles:
1) gcc/6.3.0 2) intel/19.0.5 3) python/2.7.16 4) perl/5.24.1 5) quota/1.2 6) git/2.13.0 7) core 8) gdal/3.0.1 9) geos/3.5.1 10) proj4/4.8.0
However, I still face error when I try to install sf package.
The error are shown below.
`
install.packages('sf')
Installing package into '/geode2/home/u100/wnchang/Carbonate/R/x86_64-pc-linux-gnu-library/3.6'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.case.edu/src/contrib/sf_0.9-3.tar.gz'
downloaded 8.1 MB
It seems the new problem is 'libproj' not found.
This sounds like a problem with the module file, not sf specifically or proj4. You need to set up your module so the correct paths are searched.
Try this - after doing module load proj4/4.8.0 check to see your LD_LIBRARY_PATH includes something like .../proj.4/4.8.0/lib
Whoever created your module file probably didn't add LD_LIBRARY_PATH. Ours looks something like this:
#%Module -*- tcl -*-
##
## dot modulefile
##
proc ModulesHelp { } {
global proj4version
puts stderr "\tAdds Proj.4 to your environment variables,"
}
module-whatis "Adds Proj.4 to your environment variables"
set proj4version 4.8.0
set root /apps/proj.4/$proj4version
prepend-path PATH $root/bin
prepend-path MANPATH $root/share/man/
prepend-path LD_RUN_PATH $root/lib
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path C_INCLUDE_PATH $root/include
prepend-path CPATH $root/include
Note that both Python and PROJ are past end of life. Python should be 3, and PROJ must be at least 6 to build with GDAL 3 properly. On Fedora/Centos/Redhat, it is much better to install current PROJ (with stock sqlite3, curl and tiff development RPMs) and GEOS from source, then install GDAL from source using the stock RPMs you need for drivers you use. Check what GDAL says when you run configure, and iterate through until the right drivers are present.
Hi,
When I try to install the 'sf' package in the Ubuntu 20.04 LTS, this error occurs:
* installing vignettes
* testing if installed package can be loaded from temporary location
double free or corruption (out)
Aborted (core dumped)
ERROR: loading failed
The downloaded source packages are in
β/tmp/RtmpBEgfqs/downloaded_packagesβ
Has this been sorted out?
Hi,
When I try to install the 'sf' package in the Ubuntu 20.04 LTS, this error occurs:
* installing vignettes
* testing if installed package can be loaded from temporary location
double free or corruption (out)
@rhaphael how did you sort this out?
I'm getting an identical error under Linux Mint 19.1
I've tried removing PROJ/GDAL/... etc and reinstalling them (from PPA ubuntu-gis/unstable, as recommended in the sf README), and tried installling sf both from CRAN and Github, same problem every time.
> sessioninfo::session_info()
β Session info ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
setting value
version R version 4.0.1 (2020-06-06)
os Linux Mint 19.1
system x86_64, linux-gnu
ui RStudio
language en_GB
collate en_GB.UTF-8
ctype en_GB.UTF-8
tz Europe/Berlin
date 2020-07-13
I`m facing same issue as @fabian-s :+1:
> sessioninfo::platform_info()
version R version 4.0.2 (2020-06-22)
os Ubuntu 20.04.1 LTS
system x86_64, linux-gnu
ui RStudio
language en_US:en
collate lt_LT.UTF-8
ctype en_US.UTF-8
tz Europe/Vilnius
date 2020-08-13
any tips to solve the double free or corruption issue?
@edzer @dickoa
sorry to be a pest and to bump the issue like this, but since it seems that other people have the same problem as me, some guidance on this issue would be very appreciated, if any of you can spare the time.
Thanks a lot for the great package and all the work that goes into maintaining a huge project like this.
Then we first need complete error reports including:
sessionInfo(), sf from source
Most helpful comment
Note that both Python and PROJ are past end of life. Python should be 3, and PROJ must be at least 6 to build with GDAL 3 properly. On Fedora/Centos/Redhat, it is much better to install current PROJ (with stock sqlite3, curl and tiff development RPMs) and GEOS from source, then install GDAL from source using the stock RPMs you need for drivers you use. Check what GDAL says when you run configure, and iterate through until the right drivers are present.