Unable in install Terra

Hello;

I've pasted the error below this message. I'm trying to install SF into an RStudio environment running in RHEL v. 8.9. AFAIK the required libraries are installed. If anyone requires some additional information let me know and I can provide it as-needed.

> renv::install('sf')
Retrieving 'https://cran.rstudio.com/src/contrib/sf_1.0-15.tar.gz' ...
                OK [file is up to date]
Installing proxy [0.4-27] ...
                OK [linked cache]
Installing e1071 [1.7-14] ...
                OK [linked cache]
Installing classInt [0.4-10] ...
                OK [linked cache]
Installing DBI [1.2.1] ...
                OK [linked cache]
Installing wk [0.9.1] ...
                OK [linked cache]
Installing s2 [1.1.6] ...
                OK [linked cache]
Installing units [0.8-5] ...
                OK [linked cache]
Installing sf [1.0-15] ...
                FAILED
Error installing package 'sf':
==============================

* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++14
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.0.4
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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc 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
/usr/lib64/libgdal.so: undefined reference to `PQcmdStatus@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQfname@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQsetNoticeProcessor@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQftable@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQstatus@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQftablecol@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQconnectdb@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQescapeStringConn@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `lo_close@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQputCopyEnd@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQgetvalue@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQgetisnull@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQftype@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQfmod@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `lo_creat@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQresultStatus@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `lo_read@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQexec@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQsetClientEncoding@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQgetlength@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQputCopyData@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQgetResult@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `lo_write@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQfinish@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQclear@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQerrorMessage@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQnfields@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `lo_open@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQexecParams@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQntuples@RHPG_9.6'
/usr/lib64/libgdal.so: undefined reference to `PQresultErrorMessage@RHPG_9.6'
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -larmadillo
/usr/bin/ld: cannot find -lpoppler
/usr/bin/ld: cannot find -ljson-c
/usr/bin/ld: cannot find -lfreexl
/usr/bin/ld: cannot find -lwebp
/usr/bin/ld: cannot find -lkmlbase
/usr/bin/ld: cannot find -lkmldom
/usr/bin/ld: cannot find -lkmlengine
/usr/bin/ld: cannot find -lkmlxsd
/usr/bin/ld: cannot find -lkmlregionator
/usr/bin/ld: cannot find -lxerces-c
/usr/bin/ld: cannot find -lopenjp2
/usr/bin/ld: cannot find -lnetcdf
/usr/bin/ld: cannot find -lhdf5
/usr/bin/ld: cannot find -lmfhdf
/usr/bin/ld: cannot find -ldf
/usr/bin/ld: cannot find -logdi
/usr/bin/ld: cannot find -lgif
/usr/bin/ld: cannot find -lgeotiff
/usr/bin/ld: cannot find -lgta
/usr/bin/ld: cannot find -lcfitsio
/usr/bin/ld: cannot find -lpq
/usr/bin/ld: cannot find -ldapclient
/usr/bin/ld: cannot find -ldapserver
/usr/bin/ld: cannot find -ldap
/usr/bin/ld: cannot find -lspatialite
/usr/bin/ld: cannot find -lsqlite3
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 ‘sf’
* removing ‘/workbench/home/bmaillou/projects/spatial-cluster-analysis/renv/staging/1/sf’
Error: install of package 'sf' failed [error code 1]

Your system doesn't have the libraries required to compile terra from source. Those libraries are enumerated here: https://p3m.dev/client/#/repos/cran/packages/overview?search=terra
You can view directions for configuring this repository for use here:
https://p3m.dev/client/#/repos/cran/setup?distribution=redhat-8&r_environment=ide

You can also install a pre-compiled binary from Posit Package Manager: renv::install("sf", repos = "https://p3m.dev/cran/__linux__/centos8/latest"). You will need the libraries referenced above to load the package anyway.

Hi David; Thank you for responding. I installed the binary package and it appears to work!

Thank you for your support!

Braden.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.