0

I just created an EC2 instance using an Amazon Linux 2023 AMI (al2023-ami-2023.1.20230705.0-kernel-6.1-x86_64). I'm trying to install gdal so that I can use terra in R. However, all of the current guidance says to use EPEL, which is not available on Amazon Linux 2023.

I think I was able to install gdal and geos using spack as a workaround, which successfully built gdal and geos and about 38 dependencies. However, trying to install terra within R still gives me the following error:

Installing terra [1.7-23] ...
        FAILED
Error installing package 'terra':
=================================

* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++14
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/MY_PROJECT_DIRECTORY/renv/staging/1/terra’
Error: install of package 'terra' failed [error code 1]
Traceback (most recent calls last):
12: renv::restore()
11: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
10: renv_install_impl(records)
 9: renv_install_staged(records)
 8: renv_install_default(records)
 7: handler(package, renv_install_package(record))
 6: renv_install_package(record)
 5: withCallingHandlers(renv_install_package_impl(record), error = function(e) {
        vwritef("\tFAILED")
        writef(e$output)
    })
 4: renv_install_package_impl(record)
 3: r_cmd_install(package, path)
 2: r_exec_error(package, output, "install", status)
 1: stop(error)

As you can see, I'm using renv as a package manager, if that matters.

This was originally marked as a duplicate of this question, but it does not apply because:

  1. I am running a Red Hat flavor of Linux, not Debian.
  2. gdal-devel is not available in Amazon Linux 2023.

Specifically, if I try to run dnf search gd:

Last metadata expiration check: 11:17:55 ago on Tue Jul 18 02:29:44 2023.
========================================== Name Exactly Matched: gd ===========================================gd.x86_64 : A graphics library for quick creation of PNG or JPEG images
========================================= Name & Summary Matched: gd ==========================================gcc-gdb-plugin.x86_64 : GCC plugin for GDB
gd-devel.x86_64 : The development libraries and header files for gd
gd-progs.x86_64 : Utility programs that use libgd
gdb-doc.noarch : Documentation for GDB (the GNU source-level debugger)
gdb-gdbserver.x86_64 : A standalone server for GDB (the GNU source-level debugger)
gdbm-devel.x86_64 : Development libraries and header files for the gdbm library
gdbm-libs.x86_64 : Libraries files for gdbm
gdk-pixbuf2-devel.x86_64 : Development files for gdk-pixbuf2
gdk-pixbuf2-modules.x86_64 : Additional image modules for gdk-pixbuf2
gdk-pixbuf2-tests.x86_64 : Tests for the gdk-pixbuf2 package
google-noto-sans-old-sogdian-fonts.noarch : Noto Sans Old Sogdian font
google-noto-sans-sogdian-fonts.noarch : Noto Sans Sogdian font
graphviz-gd.x86_64 : Graphviz plugin for renderers based on gd
librevenge-gdb.x86_64 : gdb pretty printers for librevenge
perl-GD.x86_64 : Perl interface to the GD graphics library
perl-GD-Barcode.noarch : Create barcode image with GD
perl-GDBM_File.x86_64 : Perl5 access to the gdbm library
php8.1-gd.x86_64 : A module for PHP 8.1 applications for using the gd graphics library
php8.2-gd.x86_64 : A module for PHP 8.2 applications for using the gd graphics library
ruby3.2-rubygem-bigdecimal.x86_64 : BigDecimal provides arbitrary-precision floating point decimal arithmetic  
rust-gdb.noarch : GDB pretty printers for Rust
texlive-flagderiv-doc.noarch : Documentation for flagderiv
texlive-kdgdocs-doc.noarch : Documentation for kdgdocs
============================================== Name Matched: gd ===============================================gdb.x86_64 : A stub package for GNU source-level debugger
gdb-headless.x86_64 : A GNU source-level debugger for C, C++, Fortran, Go and other languages
gdb-minimal.x86_64 : A GNU source-level debugger for C, C++, Fortran, Go and other languages (minimal version) 
gdbm.x86_64 : A GNU set of database routines which use extensible hashing
gdisk.x86_64 : An fdisk-like partitioning tool for GPT disks
gdk-pixbuf2.x86_64 : An image loading library
glibc-langpack-gd.x86_64 : Locale data for Scottish Gaelic
swig-gdb.x86_64 : Commands for easier debugging of SWIG
texlive-ecgdraw.noarch : Draws electrocardiograms (ECG)
texlive-flagderiv.noarch : Flag style derivation package
texlive-kdgdocs.noarch : Document classes for Karel de Grote University College
texlive-longdivision.noarch : Long division arithmetic problems
============================================= Summary Matched: gd =============================================langpacks-core-en_GB.noarch : English (United Kingdom) langpacks core meta-package
langpacks-en_GB.noarch : English (United Kingdom) langpacks meta-package
AaronDD
  • 21
  • 4

0 Answers0