letmaik / lensfunpy

📷 Lens distortion correction for Python, a wrapper for lensfun
https://pypi.python.org/pypi/lensfunpy
MIT License
145 stars 18 forks source link

ImportError: liblensfun.so.1 on Mint 17.2 #8

Closed Fi156 closed 8 years ago

Fi156 commented 8 years ago

Hi,

the fix:

echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/99local.conf
sudo ldconfig

does not work for me.

When installed with "apt-get" the libraries are located in a subdirectory of /usr/local/lib:

/usr/local/lib
├── x86_64-linux-gnu
│   ├── pkgconfig
│   │   └── lensfun.pc
│   ├── liblensfun.so.1 -> liblensfun.so.0.3.2
│   ├── liblensfun.so.0.3.2
│   └── liblensfun.so -> liblensfun.so.1

Changing the location to the subdirectory works for me:

echo "/usr/local/lib/x86_64-linux-gnu" | sudo tee /etc/ld.so.conf.d/99local.conf
sudo ldconfig
letmaik commented 8 years ago

Thanks for reporting. I'll try to find out why this happens in the first place, but I'm no expert on this and I will probably ask the lensfun guys about it, maybe they have an idea. If we come to a conclusion I will come back to this issue and possibly adjust the README.

letmaik commented 8 years ago

Can you please let me know how exactly you installed the liblensfun library on your system? Typically, when installed via apt-get, the libraries don't use the /usr/local folder, only when manually compiled and installed. Also, version 0.3.2 is not yet released on Ubuntu/Debian repos (according to a lensfun developer).

Fi156 commented 8 years ago

Sorry, yes it may be that the used library was compiled by myself some time ago. I am pretty sure that I used this manual: http://lensfun.sourceforge.net/development/

So I deleted 99local.conf as well as the directory x86_64-linux-gnu. The libraries installed with apt-get are located in:

/usr/lib/liblensfun.so
/usr/lib/liblensfun.so.0
/usr/lib/liblensfun.so.0.2.8

Afterwards the import error comes back again. Linking to this dir with:

echo "/usr/lib/ | sudo tee /etc/ld.so.conf.d/99local.conf
sudo ldconfig

does not work and I think that it does not make sense also...

letmaik commented 8 years ago

Note that you also have to reinstall lensfunpy to use the new path. If that still doesn't work then there's probably some left overs from your manual liblensfun installation in the pgkconfig (which would point to a non-existant folder).

Fi156 commented 8 years ago

Ok, after reinstalling lensfunpy is working now!

Thank you!

I think the following happened:

So when using a self compiled version it is still needed to link /usr/local/lib/x86_64-linux-gnu instead of /usr/local/lib.