[Qgis-user] Unable to open MrSID file in QGIS even if gdalinfo can read it

Fernando M. Roxo da Motta petro at roxo.org
Mon Sep 23 09:02:37 PDT 2024


On Sun, 22 Sep 2024 20:27:32 -0700, Andrew Plowright via QGIS-User
<qgis-user at 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 <petro at 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!
 


More information about the QGIS-User mailing list