I know there are similar questions here, but I've tried every answer and every tutorial I could find, and I still can't open ECW with QGIS (and I kind of broke my qgis install? When I try to install QGIS I have dependancy errors for qgis-providers, qgis-plugin-grass and python-qgis now). I use Ubuntu 20.04 and QGIS 3.24.1.
I compiled GDAL with ECW support, which seems to work fine as
gdalinfo --formats | grep ECW
gives
ECW -raster- (rw+): ERDAS Compressed Wavelets (SDK 5.4)
JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 5.4)
But I don't know how to make QGIS use the version that I compiled. gdalinfo --version
gives me GDAL 2.3.2, released 2018/09/21
but when I go to the QGIS details it says QGIS is using GDAL 3.0.4. I also tried one of the tutorials from a clean Ubuntu install (on a virtual box) and it still didn't work. I don't know what I'm doing wrong but I'm not really used to dealing with these kinds of things so potentially I am doing some things wrong. I also read somewhere that I should try to compile QGIS with my GDAL install but I have no idea how to do that.
Best Answer
Compiling GDAL using proprietary library to support ECW file format - Ubuntu
QGIS uses GDAL for file formats.
1. UPDATE -
2. Run bin - Choose Option 1. Desktop_Read-Only
./ERDAS_ECWJP2_SDK-5.4.0.bin
3. Copy installed files to /usr/local/hexagon_ecw
4. Make symbolic link to libs like libNCSEcw.so.**
5. Download and install proper PROJ version
Get PROJ version from Help->About Mine is 6.3.1
Download from https://github.com/OSGeo/PROJ/releases.
6. Downlad GDAL for specific QGIS version
Get GDAL version from Help->About QGIS 3.26.3 uses gdal 3.0.4
Download from http://download.osgeo.org/gdal
If you get errors on
make
above, use this bellow before the make command above (from here)7. Set env. variables
8. Check if ECW is installed
gdalinfo --formats | grep ECW
Based and updated from here.
Tested on Ubuntu 22.04 and 20.04