[Q] gdal-sys can't build
Arjen10 opened this issue · 2 comments
I have already installed QGIS, the GDAL environment is functioning properly, at least QGIS works perfectly fine when using GDAL.
gdal version
arjen@arjen10:~$ gdalinfo --version
GDAL 3.4.1, released 2021/12/27
os info
arjen@arjen10:~$ cat /proc/version
Linux version 6.2.0-39-generic (buildd@lcy02-amd64-045) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2
When Cargo introduces the GDAL dependency, it throws the following error:
Package gdal was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdal.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdal' found
I have read the README documentation for gdal-sys. maybe I need to configure the environment variables for GDAL. but I cannot find the locations for GDAL_INCLUDE_DIR and GDAL_LIB_DIR, for example.
so, partners, how do we resolve this issue?
On Ubuntu you need to install libgdal-dev
to get the development headers, libraries and pkg-config
support.
On Ubuntu you need to install
libgdal-dev
to get the development headers, libraries andpkg-config
support.
Thank you, after installing libgdal-dev, everything is working normally.