17

From one of my customers I got an application. When I try to run it I got following error

error while loading shared libraries: ./libvtkWidgets.so.5.4: file too short

In my project structure I see following:

-rwxrwxrwx  1 tomasz tomasz       20 2011-02-01 10:44 libvtkWidgets.so
-rwxrwxrwx  1 tomasz tomasz       22 2011-02-01 10:44 libvtkWidgets.so.5.4
-rwxrwxrwx  1 tomasz tomasz  2147103 2011-02-01 10:44 libvtkWidgets.so.5.4.2

Is my shared library libvtkWidgets corrupted ? How to solve that error ?

2
  • Running sudo ldconfig gives you the exact problem ("File *** is empty, not checked." or "*** is not a symbolic link")
    – Yan Foto
    Dec 15 '15 at 11:17
  • 1
    This happened to me when extracting the archive with 7-Zip. Using tar fixed the issue, see here. Jul 25 '20 at 11:30
22

There was probably an error copying/extracting the libraries. libvtkWidgets.so and libvtkWidgets.so.5.4 should not be files but symbolic links. Try the following:

rm libvtkWidgets.so.5.4 libvtkWidgets.so
ln -s libvtkWidgets.so.5.4.2 libvtkWidgets.so.5.4
ln -s libvtkWidgets.so.5.4 libvtkWidgets.so

Anyway you should check if the software that you are installing is available from the software center. If it is not available and if the above fix does not work you will need to contact the application provider.

3
  • 3
    Thanks a lot, indeed I did a mistake extracting files on Windows and copying extracted files to my Ubuntu virtual machine. That's why all symbolic links were gone.
    – tommyk
    Feb 1 '11 at 13:17
  • I'm creating my own C++ extension, and even after making it a symbolic link the problem persisted. Is there a cache I'm not aware of? Aug 9 '16 at 0:59
  • Same thing here @tommyk. Used 7zip to extract on Windows and then tried to use the Hadoop files in my WSL instance.
    – forgetso
    Mar 9 at 11:26

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.