One Command To Install All Ubuntu Packages for Qt 5 Build

You have just installed a fresh Linux system. The next step is to build Qt from sources. You install the required Linux packages, configure and build Qt. After an hour or so, your build fails because a package is missing. You must start over again … and again … Wouldn’t it be nice to have a single command that installs all the required Ubuntu packages and save all these needless iterations?

Here is the command:

sudo apt-get install \
g++ ruby gperf bison flex sqlite libsqlite3-dev libfontconfig1-dev \
libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev \
libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev \
libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-xfixes0-dev \
libxcb-shape0-dev libxcb-randr0-dev libgl1-mesa-dev libgstreamer0.10-dev \
libgstreamer-plugins-base0.10-dev libpulse-dev libdbus-1-dev libssl-dev \
libcups2-dev libicu-dev

Create the following links in /usr/lib to “install” the OpenGL library in the standard location.

sudo ln -s i386-linux-gnu/mesa/ .
sudo ln -s i386-linux-gnu/mesa/ .
sudo ln -s i386-linux-gnu/mesa/ .

For 64-bit Linux system, the folder i386-linux-gnu must be adapted.

This little trick would have saved me from numerous rebuilds, because I had forgotten one or the other package. Hope it saves you some time as well.