0

I have written a code that runs successfully on a ubuntu machine having Qt installed but when I'm trying to run the executable on another ubuntu machine that don't have Qt I am getting this error:

error while loading shared libraries: libQt5Widgets.so.5
Rsvay
  • 1,285
  • 2
  • 13
  • 36
  • a quick fix is: `sudo apt-get install libqt5gui5`. Depending on used features you need to install [other packages](http://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libqt5). Or install all by installing `libqt5-dev` package. – Marek R Oct 28 '13 at 09:55

2 Answers2

2

Since you have a shared build, you need the required shared Qt libraries on your system.

Alternatively if you want to build a standalone executable then you will have to compile it statically.

Following link maybe helpful: How to make binary distribution of Qt application for Linux

Community
  • 1
  • 1
Abhishek Bansal
  • 12,589
  • 4
  • 31
  • 46
0

As is clear, the required Qt libraries are not installed on the other machine, you will need to install Qt libraries first.

The standard procedure followed on Linux, is to create a package (Debian, rpm, pacman etc.) Since you are using Ubuntu, you should create a Debian package with libqt5gui5 mentioned as dependency, so when you install the package, Qt libraries are automatically downloaded and installed if necessary.

adnan kamili
  • 8,967
  • 7
  • 65
  • 125