-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure: error: gdal.h not found in given locations. #408
Comments
I can see that your system has GDAL ( I suspect that you either have multiple version of GDAL or a bad one. Do these links provide help? https://github.com/r-spatial/sf#multiple-gdal-geos-andor-proj-versions-on-your-system Also, can you try to install |
There is also a work-around. I assume that you need
That won't affect anything at all as long as you do not actually need |
I don't have another version running to my knowledge. I've looked at all those issues but can't seem to find something that works. I tried installing the last version of raster and got this result: For the package I actually need (which depends on raster and thus terra) I have to use R (>= 3.4.0 & < 3.6.0) I tried installing sf and here is the result. Any other thoughts on things to try? Thank you for your help!
|
You cannot do
you need to first download the file. For example
|
Ok thank you for the correction. I installed it as you say and I got virtually the same long output as when I installed sf above (all the statements that end in "M_value". The last part was a little different:
|
Can you please run it one more time (so that dependencies are already dealt with), and show the entire output? |
I got the same output:
|
This is the first error
This message:
would seem to be because the |
Closing for lack of updates. I hope you were able to fix this. |
Hi, I'm trying to install terra because it's a dependency for something else I am trying to install. I keep getting this error:
configure: error: gdal.h not found in given locations.
I have tried installing via:
install.packages("terra", repos="https://cran.r-project.org")
remotes::install_github("rspatial/terra")
I've also tried with the --with-gdal-config option but keep getting the same error.
Here is the full installation output:
Installing package into ?/home2/s207424/R/x86_64-pc-linux-gnu-library/3.5?
(as ?lib? is unspecified)
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /cm/shared/apps/gdal/gcc/2.4.1/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.1
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... no
checking gdal.h presence... no
checking for gdal.h... no
configure: error: gdal.h not found in given locations.
ERROR: configuration failed for package ?terra?
Error in i.p(...) :
(converted from warning) installation of package ?/tmp/RtmpX3V4ee/file13c7c237b428a/terra_1.4-21.tar.gz? had non-zero exit status
And my R session info:
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.6 (Maipo)
Matrix products: default
BLAS/LAPACK: /cm/shared/apps/intel/compilers_and_libraries/2017.6.256/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] usethis_1.4.0 devtools_2.0.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 rstudioapi_0.8 magrittr_2.0.1 pkgload_1.0.1 R6_2.5.1 rlang_0.4.12
[7] tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.0 cli_3.1.0 withr_2.4.2 remotes_2.0.1
[13] yaml_2.2.0 assertthat_0.2.0 digest_0.6.28 rprojroot_1.3-2 crayon_1.4.2 processx_3.2.0
[19] callr_3.0.0 base64enc_0.1-3 fs_1.2.6 ps_1.2.0 curl_3.2 testthat_2.0.1
[25] memoise_1.1.0 glue_1.5.0 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2
And here are the modules I have loaded:
gcc/6.1.0
slurm/16.05.8
texlive/2014
hdf5_18/1.8.11
java/oracle/jdk1.8.0_65
intel/compiler/64/2017/current
intel/16.0.2
mpfr/3.1.2
intel/mkl/64/2017/current
CGAL/4.1
libxml2/2.9.4
geos/gcc/3.7.2
R/3.5.1-gccmkl
proj/gcc/6.0.0
rstudio-desktop/1.1.456
sqlite3/3.36.0
gdal/gcc/2.4.1
Thank you!
The text was updated successfully, but these errors were encountered: