Skip to content

Installation on Linux

Skiychan edited this page Jul 13, 2019 · 36 revisions
  • Install g++ >= 5 and some OpenGL dependencies

    • Debian/Ubuntu (apt-get)

      sudo apt-get -y install build-essential libglu1-mesa-dev libpulse-dev libglib2.0-dev
    • Fedora/RHEL/CentOS (yum)

      sudo yum -y groupinstall "C Development Tools and Libraries"
      sudo yum -y install mesa-libGLU-devel gstreamer-plugins-base pulseaudio-libs-devel glib2-devel
    • openSUSE (zypper)

      sudo zypper -n install -t pattern devel_basis
    • Arch Linux (pacman)

      sudo pacman -S base-devel

Fast track version

If you want to install Go
GO=go1.12.6.linux-amd64.tar.gz; echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile; source $HOME/.profile; curl -sL https://dl.google.com/go/$GO | sudo tar -xz -C /usr/local
If you want to install the binding
In GOPATH mode
go get -u -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
go get -u -v github.com/therecipe/qt/cmd/qtsetup && go get -u -v github.com/therecipe/qt/cmd/... && go mod vendor && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtsetup -test=false
If you just want to compile an application

(replace github.com/therecipe/examples/... with the project you want to compile)

In GOPATH mode
go get -u -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtdeploy test desktop github.com/therecipe/examples/basic/widgets
git clone https://github.com/therecipe/examples.git && cd ./examples && go mod download && go get -u -v github.com/therecipe/qt/cmd/qtdeploy && go get -u -v github.com/therecipe/qt/cmd/... && go mod vendor && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtdeploy test desktop ./basic/widgets

Official version (with Android support)


Your system package managers version (without Android support)

Your applications won't run on a different distro than the one you used to deploy your application, but this is currently the only option to make your application look native on your distro. More infos about this issue here: Why does my application don't look native on Linux?

  • Install the Qt5 dev packages through your systems package manager and export QT_PKG_CONFIG=true. (You will need to install the html/doc packages containing the *.index files as well.)

    • Debian/Ubuntu: sudo apt-get --no-install-recommends install libqt*5-dev qt*5-dev qml-module-qtquick-* qt*5-doc-html
    • Arch Linux: sudo pacman -S --needed qt5
    • openSUSE: sudo zypper install --no-recommends libqt5-qt*-devel
    • (TODO: list commands for the most common linux distros)
  • Install Go: https://golang.org/doc/install?download=go1.12.6.linux-amd64.tar.gz

  • Clone the repo: go get -u -v -tags=no_env github.com/therecipe/qt/cmd/...

  • Run the setup: $(go env GOPATH)/bin/qtsetup


Now that you are done with the installation you can start reading the usage instructions and build the examples.

Clone this wiki locally