How do I setup ECW support for QGIS in Linux?

In windows it's super easy, due to the OSGeo4W installer, but I can't get it running in linux.

I tried a lot of topics from gis.stackexchange like these:

or other blogs like this one: 3

The main problem is, that the AUR package for libecwj2 isn't online anymore and I'm still new to compiling software in linux. So somehow the compilation, which is described in the first two links, always fails.

@SamTux replied but I still can't get it running.

The archgeotux-repository did work so far, but I somehow I got the following error: link
I wasn't able to open qgis anymore and it looks like a lot of more trouble. So I thought this can't be the answer.

I could install the libecwj2 AUR package (YUHUUU!), but got stuck with the recompilation of gdal. I found it also strange why it's not possible to edit PKGBUILD of the gdal but for the gdal-filegdb package?

When I do the recompile of gdal-filegdb the package "libkml" fails: build-log

Another question, when I upgrade in the future to a newer version of gdal, do I always have to edit the PKGBUILD do ensure the ecw support?

  • maybe describe where it is failing?
    – Stev_k
    Nov 2, 2018 at 17:00
  • As per the Tour there should be only one question asked per question.
    – PolyGeo
    Nov 4, 2018 at 20:24
  • Note that ECW v3.3 / libecwj2 was released in 2006, is completely out of date and does not support more recent ECW files. It's also extremely buggy. If you just want to read ECW, build the GDAL driver against an up to date ECW SDK.
    – user2856
    Nov 4, 2018 at 23:39

3 Answers 3


I came across the same issue and created a AUR package for gdal with ecw support: https://aur.archlinux.org/packages/gdal-ecw

It's based on the solution above.


Finally, I managed to open ECW files with the help of a self-compiled GDAL library. Due to many difficult to understand instructions all around the web, I'll try to summarize what was necessary to get it running. I decided to create a community wiki, because I certainly didn't find the best solution and so other people can simplify this solution for all interested people.

- Manjaro with QGIS installed from the official repositories
- Due to QGIS installation, the gdal-lib should be already installed as well

How to set up the ECW support for QGIS on Manjaro Linux

  1. First install the libecwj2 libary.

Luckiley it is online again, so it is possible to install it easily by the Manjaro built in package manager. The lib is listed in the AUR repository, so the support of the AUR needs to be activated.

  1. Downloaded latest gdal-sources from here: https://trac.osgeo.org/gdal/wiki/DownloadSource
  2. Unzip the file and open a terminal
  3. Change directory: cd into/the/path/of/your/unzipped/gdal-folder
  4. Configure to create the makefile-file with the ecw option ./configure --with-ecw

    If you need more options just add them. Here you can find more infos.

  5. Compile gdal make
  6. Install gdal sudo make install
  7. Now somehow the installation didn't work as expected. I think at this point my knowledge about compilation is still limited. So due to the installation the new compiled gdal was installed in /usr/local-path instead of /usr-path.. so what I copied manually all gdal-files from /usr/local-path to /usr-path..

After this last manual step I was able to open ecw files in qgis.

  • 1
    In step 8, do you mean copy all file from /usr/local/bin/ to /usr/bin/ ?
    – mega
    Apr 12, 2019 at 10:35
  • @mega: No, not all, just the gdal-files.
    – basto
    Apr 18, 2019 at 17:41

Effectively the link source to the libecwj2 AUR package is broken. However you can make the following change in the PKGBUILD and it works correctly.


However, you must recompile GDAL with ECW support. For that follow the ECW compilation link in Arch Linux.

For ease of installation you can add the following unofficial repository called ArchGeoTux:


And install with:

# pacman -S gdal-ecw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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