I added Ubuntugis unstable repo and installed Qgis, libgdal-ecw-src, libecwj2-3.3 but still do not work.

When I attempt to open an ecw file with Qgis it crash and tells me that there are problems with this libraries:


I am using ubuntu 12.10 and when I do:

gdalinfo --formats|grep -i ecw

it seems to work.

ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)

What is the problem?

  • can you gdalinfo the ecw file in question? can gdalinfo read it? – nickves Jul 25 '13 at 18:57
  • How can i run gladinfo to read a file? – gaia Jul 25 '13 at 21:25
  • No, it is the output: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create – gaia Jul 25 '13 at 21:39
  • Qgis 1.8 compiled with gdal 1.10.0 – gaia Jul 25 '13 at 21:53
  • it seems gdal cannot find the appropriate libraries for ECW. Can you open a console, write LD_LIBRARY_PATH=/usr/local/lib/ and then run qgis from the same terminal (usually with qgis)? – nickves Jul 25 '13 at 22:01

The ECW/JPEG2000 SDK v3.3 is very buggy. More often with JP2's but I've had numerous crashes with ECWs as well. The new v5.0 SDK should be much more robust. Try uninstalling 3.3 and installing the v5.0 SDK.

  • I had install v 5 SDK following this post "gis.stackexchange.com/questions/27247/…" – gaia Jul 25 '13 at 22:24
  • but version 3 persist, how to unistall it? – gaia Jul 25 '13 at 22:25
  • @gaia sudo rm /usr/local/lib/libNCS* and sudo rm /usr/local/include/*.h then reinstall the v5.0 SDK. – user2856 Jul 25 '13 at 22:34
  • sudo gdal-ecw-build "/usr/local/ecwjp2_sdk grep: /usr/local/ecwjp2_sdk/include/ECW.h: File o directory non esistente /usr/local/ecwjp2_sdk seems not containing an ECW SDK 3.3" – gaia Jul 25 '13 at 23:47
  • @gaia Sounds like you didn't follow the instructions to update the libgdal-ecw-src package. Run sudo apt-get update && sudo apt-get upgrade – user2856 Jul 26 '13 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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