Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt project release ubuntu - error while loading shared libraries: libQt5Widgets.so.5

Tags:

c++

ubuntu

qt

I want to release my project written with Qt to a Ubuntu / Linux user. If they try to execute the build release version they get this error message, because they have not installed Qt:

error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

Is there a way to add all the libraries such as libQt5Widgets.so.5 to the folder where the executable is, just like under Windows with qt.conf, where you can specify the Plugins folder?

like image 381
Niklas Avatar asked Jan 20 '14 21:01

Niklas


3 Answers

Try this

sudo apt-get install libqt5widgets5

like image 159
hoi Avatar answered Nov 10 '22 22:11

hoi


One solution could be:

export LD_LIBRARY_PATH=/path/to/dir/with/libs:$LD_LIBRARY_PATH

But a proper solution would be to install QT libraries in system and/or package your app for Ubuntu (in your case).

like image 45
kikeenrique Avatar answered Nov 10 '22 22:11

kikeenrique


I had recently updated the Android tools via the SDK manager when I saw this error.

Re-install the SDK tools to fix. That is what worked for my machine.

like image 1
Matt Kneiser Avatar answered Nov 10 '22 22:11

Matt Kneiser