Skip to content
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

Can't find gdal-config during installation #1647

Open
davidelahoz opened this issue Nov 18, 2024 · 3 comments
Open

Can't find gdal-config during installation #1647

davidelahoz opened this issue Nov 18, 2024 · 3 comments

Comments

@davidelahoz
Copy link

When trying to install terra on a Rstudio server running on ubuntu server, the following message is shown, impeding this package installation:

* installing *source* package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++17
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘terra’
* removing ‘/home/operador/R/x86_64-pc-linux-gnu-library/4.3/terra’
Warning in install.packages :
  installation of package ‘terra’ had non-zero exit status

I have GDAL 3.8.4 installed on that server

Does this package require a specific version of GDAL to work?

@davidelahoz
Copy link
Author

libgdal-dev was missing. After installing it, spatialEco installation worked fine

Would it be possible to mention that libgdal-dev is missing in that warning?

@rhijmans
Copy link
Member

rhijmans commented Nov 28, 2024

@rsbivand, does the above suggestion make sense to you? If so, would you change, in the sf configure script that I use as the master, the message "gdal-config not found or not executable." to something like "gdal-config not found or not executable (did you install libgdal-dev?)."?

@rsbivand
Copy link
Contributor

It is only libgdal-dev on debian/ubuntu, we'd need a longer list in general. It gets messy when Windows or macOS users stumble into source installs. I'll try to think of something concise.

rsbivand added a commit to rsbivand/terra that referenced this issue Nov 29, 2024
rhijmans added a commit that referenced this issue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants