Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to deal with an ECW file with QuantumGis 1.8 Lisboa, on Ubuntu 11.10. Obviously it tells me that .ecw is not a supported kind of file on QuantumGis. I have tried to install all the libraries but it still doesn't work.

What sould I do?



share|improve this question

Post is related to a rapidly changing event.

It works fine on Ubuntu 12.10. – user12971 Nov 21 '12 at 13:52

Download the libecwj 3.3 source and compile that. Then follow the UbuntuGIS ECW (libgdal-ecw-src) Tutorial

Note that the 3.3 ECW SDK is very old, but there is no support for linux in the current (4.2) version. Apparently linux will be supported in the v.5.0 SDK.

Step by step instructions...

#Get libecwj 3.3 (the old SDK), it's available from a number of sources. 
# If the link below doesn't work, google for "libecwj2-3.3"
wget -nd
tar -xvjf libecwj2-3.3.tar.bz2
cd libecwj2-3.3
sudo make install

#Install the gdal ecw plugin source package and build it 
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable && sudo apt-get update 
sudo apt-get install libgdal-ecw-src build-essential 
sudo gdal-ecw-build /usr/local 
sudo ldconfig #this step is missing from UbuntuGIS tutorial

#Try it out
gdalinfo --formats|grep -i ecw
  ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
  JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)
share|improve this answer
The UbuntuGISECW tutorial doesn't work – user8780 Jul 12 '12 at 8:53
Worked fine for me (though that was on Ubuntu 10.04). Did you compile and install libecwj 3.3? I am talking about the ERDAS (then ER Mapper) SDK from the link in my answer, NOT the libgdal-ecw-src package provided by UbuntuGIS which is simply a plugin that lets GDAL talk to the ERDAS SDK. By the way, saying "it doesn't work" is very unhelpful... – Luke Jul 12 '12 at 10:09
I just installed successfully on Ubuntu 12.04 so it does work. – Luke Jul 12 '12 at 23:48
I had to add an environment variable into /etc/environment GDAL_DRIVER_PATH=/usr/lib/gdalplugins/1.9 – U2ros Sep 10 '12 at 10:35

Nathan tells us how;

this works for me as of yesterday on 1.8 production Win7

share|improve this answer
I tried to go to the packages manager: when I manage to check libgdal-ecw-src it tells me that This change is not coming from a source that supports changelogs. Failed to fetch the changelog for libgdal-ecw-src URI was:… What should I do? – user8780 Jul 11 '12 at 12:28
ps: the ESRI link doesn't work well on Ubuntu. – user8780 Jul 11 '12 at 12:28

There may be an issue with your gdal-ecw-build script. My system:

  • LinuxMint 12 (based on Ubuntu 11 oneiric)
  • package source: standard deb oneiric main restricted universe multiverse . On this installed using ubuntu package manager:
  • qgis
  • libgdal-ecw-src 1.9.1-2~oneiric3

ERmapper libecwj2-3.3 compiled and installed fine as per above instructions, but the GDAL-ECW-BUILD script crashes because it expects (at least on my system) the libgdal-ecw-src tarball to be in the *gz*ip format, whereas it actually is a plain tar. If running the script on your system crashes with a message like:

Extracting GDAL/ECW tarball
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Building GDAL/ECW plugin
cd: 70: can't cd to /tmp/gdal-ecw-build.fCIAbO/libgdal-ecw-1.9.1

then open the /usr/bin/gdal-ecw-build script in your text editor (as root), scroll down to around line 59 where you may see:

echo "Extracting GDAL/ECW tarball" 

Change the second line to read:

echo "Extracting GDAL/ECW tarball" 

Save, rerun the script and you should be fine.

share|improve this answer

In my personal blog there are two posts, "Adding ECW support to GDAL via plugins" and "Revisiting ECW support to GDAL via plugins: a patch." that you might help you despite the described procedures are cumbersome.

These blog posts are recipes to add to the GDAL library limited support for the ECW format. Once this is achived, QGIS should be able to read ECW files.

share|improve this answer
The links are dead. – knutole Apr 3 '15 at 0:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.