rspatial/terra

error in install terra on Ubuntu

Closed this issue · 2 comments

install.packages('terra', repos='https://rspatial.r-universe.dev')
Installing package into ‘/data/lmx/R/x86_64-conda-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://rspatial.r-universe.dev/src/contrib/terra_1.8-0.tar.gz'
Content type 'application/gzip' length 2051555 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

  • installing source package ‘terra’ ...
    ** using staged installation
    configure: CC: x86_64-conda-linux-gnu-cc
    configure: CXX: x86_64-conda-linux-gnu-c++ -std=gnu++17
    checking for gdal-config... /data/lmx/.conda/envs/Rlmx/bin/gdal-config
    checking gdal-config usability... yes
    configure: GDAL: 3.9.3
    checking GDAL version >= 2.0.1... yes
    checking for gcc... x86_64-conda-linux-gnu-cc
    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 the compiler supports GNU C... yes
    checking whether x86_64-conda-linux-gnu-cc accepts -g... yes
    checking for x86_64-conda-linux-gnu-cc option to enable C11 features... none needed
    checking for stdio.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for strings.h... yes
    checking for sys/stat.h... yes
    checking for sys/types.h... yes
    checking for unistd.h... yes
    checking for gdal.h... yes
    checking GDAL: linking with --libs only... no
    checking GDAL: linking with --libs and --dep-libs... no
    /data/lmx/.conda/envs/Rlmx/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /data/lmx/.conda/envs/Rlmx/lib/libgdal.so: undefined reference to sqlite3_total_changes64' collect2: error: ld returned 1 exit status /data/lmx/.conda/envs/Rlmx/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /data/lmx/.conda/envs/Rlmx/lib/libgdal.so: undefined reference to sqlite3_total_changes64'
    collect2: error: ld returned 1 exit status
    configure: Install failure: compilation and/or linkage problems.
    configure: error: GDALAllRegister not found in libgdal.
    ERROR: configuration failed for package ‘terra’
  • removing ‘/data/lmx/R/x86_64-conda-linux-gnu-library/4.4/terra’

The downloaded source packages are in
‘/tmp/RtmpvQYvt2/downloaded_packages’
Warning message:
In install.packages("terra", repos = "https://rspatial.r-universe.dev") :
installation of package ‘terra’ had non-zero exit status

Maybe try conda install -c conda-forge r-terra in Anaconda Prompt instead as suggested in #973.

I am considering a question for conda, so I am closing the issue here.