Thank you Fernando, Chris, and Even,

I tried what Fernando suggested. The /usr/bin/gdalinfo and /bin/gdalinfo
files have the same inode number and the same checksums, which suggests
that they are, in fact, the same.

However, I noticed that when I enter /usr/bin/gdalinfo --version in the
terminal, I get:

GDAL 3.10.0dev-1250e96221-dirty, released 2024/08/29 (debug build)

Same as if I use /bin/gdalinfo. Whereas, if I run gdalinfo from the QGIS
Processing Toolbox, the log shows GDAL having a different version (3.8.4
instead of 3.10):

QGIS version: 3.34.4-Prizren
Qt version: 5.15.13
Python version: 3.12.2
GDAL version: 3.8.4
GEOS version: 3.12.1-CAPI-1.18.1
PROJ version: Rel. 9.4.0, March 1st, 2024

I followed Even's suggestion and ran

$ ldd /bin/qgis.bin | grep gdal

libgdal.so.34 => /lib/x86_64-linux-gnu/libgdal.so.34 (0x00007a0581a00000)

But I'm not sure what to do with that information.

So now I'm thoroughly confused. I tried running

$ sudo find -name gdalinfo

./home/andrew/.local/share/Trash/files/apps.10/gdalinfo
./home/andrew/src/gdal/build/apps/gdalinfo
./usr/local/share/bash-completion/completions/gdalinfo
./usr/share/bash-completion/completions/gdalinfo
./usr/bin/gdalinfo

I tried running these other versions of gdal, and still got version "GDAL
3.10.0dev-1250e96221-dirty", or got a Permission Denied message (even if I
was running as root, which is also weird). Where is QGIS's version of
gdalinfo hiding?

On Mon, Sep 23, 2024 at 9:11 AM Fernando M. Roxo da Motta <pe...@roxo.org>
wrote:

> On Sun, 22 Sep 2024 20:27:32 -0700, Andrew Plowright via QGIS-User
> <qgis-user@lists.osgeo.org> wrote:
>
>
> > I do indeed:
> >
> > /usr/bin/gdalinfo
> > /bin/gdalinfo
> >
>
>   This does not mean that you have two different 'gdalinfo' installed
> in your system.   I think many modern Linux distribution sysmlink
> '/bin' to '/usr/bin'.  Try to check it.  Ex:
>
> $ ls -ld /bin
> lrwxrwxrwx 1 root root 7 out 12  2020 /bin -> usr/bin/
>
>
> Another way to check if both binaries are identical or not you can use
> (at least) two approaches:
>
> $ md5sum /usr/bin/gdalinfo /bin/gdalinfo
> 6860ebde8ce3109c9b4aa15a6460d598  /usr/bin/gdalinfo
> 6860ebde8ce3109c9b4aa15a6460d598  /bin/gdalinfo
>
> If they have the same signature they are the same, even if installed at
> different places.
>
> $ ls -li /usr/bin/gdalinfo /bin/gdalinfo
> 135464 -rwxr-xr-x 1 root root 14488 mar 29  2020 /bin/gdalinfo*
> 135464 -rwxr-xr-x 1 root root 14488 mar 29  2020 /usr/bin/gdalinfo*
>
> That first number (135464) is the inode number of the file, if they are
> the same, the files are absolutely the same.
>
>
> > I suppose that with the -DCMAKE_INSTALL_PREFIX:PATH=/usr parameter,
> > this means that the version of GDAL that I built was in
> > /usr/bin/gdalinfo?
> >
> > Is there any way to determine where QGIS is looking for GDAL? If that
> > is indeed the problem, is there a way to redirect QGIS towards a
> > different installation of GDAL?
>
>   If they are the same file it make no difference.   If different files
> the order will be that of the PATH environment variable.
>
>   There is a script named 'whereiz' at:
>
>   http://docstore.mik.ua/orelly/unix/upt/ch04_10.htm
>
> That search the PATH environment variable for the given command.   For
> example:
>
> $ whereiz gdalinfo
> /usr/bin/gdalinfo /bin/gdalinfo
>
>
> In my case the '/usr/bin/' appears first in the PATH variable.
>
>
>   HTH
>
>
>
>
>
>   Roxo
>
> --
> ---------------- Non luctari, ludare -------------------+ WYSIWYG
> Fernando M. Roxo da Motta <pe...@roxo.org>              | Editor?
> Except where explicitly stated I speak on my own behalf.|  VI !!
>                 PU5RXO | PX5Q6048                       | I see text,
> ------------ Quis custodiet ipsos custodes?-------------+ I get text!
>
>
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to