Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to install 32-bit Qt on 64-bit Linux? (error while loading shared libraries: libx11-xcb.so.1: cannot open shared object file: No such file or directory)
I'm trying to install 32-bit Qt on 64-bit Linux (from here and then clicking on "view other options" and "Qt Online Installer for Linux (32-bit)"). After searching the web, I found that to get it to work I need to install some packages. So I installed a lot of packages (everything I could find on the web that was related):
sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get upgrade sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 multiarch-support gcc-multilib libc6-i386 libx11-6:i386 sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get install libx11-dev sudo apt-get dist-upgrade sudo apt-get install libgtk-3.0 libasound2 libnss3 libxss-1 libx11-xcb-dev gcc-4.7-base libstdc++6-4.7-dev
It still doesn't work. I get the following error:
./qt-unified-linux-x86-2.0.5-2-online.run: error while loading shared libraries: libx11-xcb.so.1: cannot open shared object file: No such file or directory
How can I get 32-bit Qt to work on 64-bit Linux?
Either install the 32bit version of Qt provided by that distribution or build Qt yourself.
The 32bit pre-built package has be stopped a long time ago because of very low download numbers.
How do I download the 32 bit version of Qt provided by that distribution?
Like you did for the other packages:
apt-get install qtbase5-dev:i386and all other related dev packages that you need.
[edit: Fixed package name SGaist]
I tried that and I got the error "E: Unable to locate package qt5base-dev:i386".
- which Linux is this exactly?
- you may have more success asking in the distributions forum instead
- from my experience, it's much easier to install a 32 bit Linux in a virtual machine instead fiddling with the i386 subsystems
Ok, wrong package name: it's
A quick search on packages.debian.org wold have gotten you the answer faster.
@aha_1980 It's a 64-bit Ubuntu virtual machine. It's true that I could add a 32-bit virtual machine in addition to my 64-bit virtual machine, but I don't have that much disk space so I would prefer not to.
@SGaist I installed it. How do I compile my project as a 32-bit application now? I can't find where the 32-bit version is installed and it didn't add any kit to Qt Creator.
KillerSmath last edited by
@Donald-Duck I suggest you to use the MainteneanceTool application inside of Qt Folder
@KillerSmath As already written, there's no 32bit pre-built Qt for Linux since a long time.
@SGaist Thanks, I managed to get it to work. I added
/usr/lib/i386-linux-gnu/qt5/bin/qmaketo the Qt versions (Settings > Qt Versions) in Qt Creator and then added a kit using that Qt version.