The how-to linked here is the only one that worked for me on Ubuntu 12.04 32bit and the latest version of QGIS.
Here I reproduce the steps, with the corresponding adjustments:
- Go to http://download.intergraph.com/ and select "ECW Products" from the drop-down list under "Product Family:".
- Click on "ERDAS ECW/JP2 SDK v5.3 (Linux)" (version 5.3 available from 2016-06-14) and then click on "Download Now"
- You have to register with the website.
- Unzip the downloaded file, e.g.:
unzip erdas-ecw-sdk-5.3.0-linux.zip
- Make the unzipped binary executable:
chmod +x ERDAS_ECWJP2_SDK-5.3.0.bin
- Execute the program; select option "Desktop read-only"
./ERDAS_ECWJP2_SDK-5.3.0.bin
- Now copy the
ERDAS_ECWJP2_SDK-5.3.0
folder to /usr/local
:
sudo cp -r ERDAS-ECW_JPEG_2000_SDK-5.2.1 /usr/local/
- Locate
libNCSEcw.so
and create a symbolic ("soft") link to it. Use folder x86
or x64
according to your system:
sudo ln -s /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.2.1/Desktop_Read-Only/lib/x86/release/libNCSEcw.so /usr/local/lib/libNCSEcw.so
- Now run the following commands (update dynamic links, install ECW GDAL extension and run it):
sudo ldconfig
sudo apt-get install libgdal-ecw-src
sudo gdal-ecw-build /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.2.1/Desktop_Read-Only
- Confirm that everything worked:
gdalinfo --formats | grep -i ecw
You should get something like
ECW (rw+): ERDAS Compressed Wavelets (SDK 5.3)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.3)
- Now you can run QGIS to import ECW files on a raster layer.
Very soon I should be able to report how it worked on Ubuntu 16.04 64bit, but please comment or edit this answer if you did it already.