$ type hugin hugin is hashed (/usr/local/bin/hugin)
$ hugin hugin: error while loading shared libraries: libImath.so.2: cannot open shared object file: No such file or directory
I noticed that the type gave a different path from the one you ran ldd on. I tried running it from there and got
$ /usr/bin/hugin /usr/bin/hugin: symbol lookup error: /usr/local/lib/libhuginvigraimpex.so.0.0: undefined symbol: _ZN4half5_eLutE
$ type hugin bin/hugin)
hugin is hashed (/usr/local/
$ hugin
hugin: error while loading shared libraries: libImath.so.2: cannot open shared object file: No such file or directory
I noticed that the type gave a different path from the one you ran ldd on. I tried running it from there and got
$ /usr/bin/hugin lib/libhuginvig raimpex. so.0.0: undefined symbol: _ZN4half5_eLutE
/usr/bin/hugin: symbol lookup error: /usr/local/