Only follow this guide if you know what you are doing and this is what you really want.
If you are looking only for the latest version of qBittorrent, just head to the download page and use our PPAs.

This how-to will guide you though the compilation of qBittorrent and libtorrent-rasterbar.
This guide is written for Debian/Ubuntu, but the process should be similar for other Debian-derivatives distributions.

If you run into trouble or errors at any step, check the Troubleshooting section at the bottom of the page before posting an issue.

Table of ContentsRequired dependenciesLibtorrentCompiling qBittorrent (with the GUI)Compiling qBittorrent (without the GUI; aka qBittorrent-nox aka headless)TroubleshootingCompiling (generic)Compiling libtorrentCompiling qBittorrentRunning qBittorrentNotes

Required dependencies

  • General required dependencies
  • Qt libraries

qBittorrent 4.0 – 4.1.x requires at least Qt 5.5.1, and qBittorrent 4.2 and later requires at least Qt 5.9.

Note that Qt libraries in Debian 8/9 repository is too old for compiling newer qBittorrent, you need to upgrade your system to Debian 10, or install newer Qt libraries by the other way.

If you were using Ubuntu 16.04 LTS, you could add this PPA:

For Debian 10, Ubuntu 18.04 LTS or later, just install Qt from repository

  • Python (Run time only dependency, for the search engine)

Libtorrent

Libtorrent is a library written by Arvid Norberg that qBittorrent depends on.
It is necessary to compile and install libtorrent before compiling qBittorrent.

Install Libtorrent dev pkg from repository

or use git repo and compile Libtorrent yourself.

Clone from the repo

Choose the appropriate git and compile command according to the version of libtorrent you need:

libtorrent versionqBittorrent version supportgit commandCompile commands (after running the git command, choose between using autotools or CMake)
autotoolsCMake
1.2.*>= 4.2.0git checkout RC_1_2./autotool.sh ./configure –disable-debug –enable-encryption CXXFLAGS=”-std=c++14″mkdir -p cmake-build-dir/release && cd cmake-build-dir/release cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -G “Unix Makefiles” ../..
1.1.*>= 3.3.8git checkout RC_1_1./autotool.sh ./configure –disable-debug –enable-encryptionmkdir -p cmake-build-dir/release && cd cmake-build-dir/release cmake -DCMAKE_BUILD_TYPE=Release -G “Unix Makefiles” ../..
1.0.*<= 4.1.5git checkout RC_1_0./autotool.sh ./configure –disable-debug –enable-encryptionmkdir -p cmake-build-dir/release && cd cmake-build-dir/release cmake -DCMAKE_BUILD_TYPE=Release -G “Unix Makefiles” ../..

Now you’re ready to compile:

Finally, you can install libtorrent.

If you have checkinstall, the following command will generate and install a .deb package that can be tracked and managed by your package manager:

Alternatively, the traditional way will do just fine:

For more information on building libtorrent, see libtorrent downloading and building.

Compiling qBittorrent (with the GUI)

First, obtain the qBittorrent source code.
Either download and extract a .tar archive from Sourceforge or clone the git repository:

If you clone the git repository and want to use the stable current version (rather than the development version which may not work), you need to checkout the stable branch. You can do this in two ways:

By checking out the stable branch (4.1.x at the time of writing):

Or by checking out the latest tagged stable release (4.1.5 at the time of writing):

Enter the folder in a new terminal window and run:

Finally, you can install qBittorrent:

If you have checkinstall, the following command will generate and install a .deb package that can be tracked and managed by your package manager:

Alternatively, the traditional way will do just fine:

That’s it! qBittorrent should now be installed. You can now run qBittorrent using the following command:

Compiling qBittorrent (without the GUI; aka qBittorrent-nox aka headless)

First, obtain the qBittorrent source code.
Either download and extract a .tar archive from Sourceforge or clone the git repository:

If you clone the git repository and want to use the stable current version (rather than the development version), you need to checkout the stable branch.

(Note: When the stable version changes to 4.2.0, the stable branch will change to v4_2_x.)

Enter the folder in a new terminal window and run:

Finally, you can install qBittorrent:

If you have checkinstall, the following command will generate and install a .deb package that can be tracked and managed by your package manager:

Alternatively, the traditional method will do just fine:

That’s it! qBittorrent-nox should now be installed. You can now run qBittorrent-nox using the following command:

Since you disabled the graphical user interface, qBittorrent can only be controlled via its WebUI. If you haven’t disabled authentication, as a default, you can access it at:

Documentation about running qBittorrent without GUI is available here.

Troubleshooting

Compiling (generic)

  • In the make command, the -j$(nproc) flag makes the number of build jobs equal to the number of threads available; increasing it may make the build faster, but an eye must be kept on the memory usage.

Compiling libtorrent

  • If you get a configure: error: Boost.System library not found, check if you installed all the above dependencies.
    If yes, add --with-boost-libdir=/usr/lib/i386-linux-gnu

Compiling qBittorrent

  • If you’re using libtorrent-rasterbar from the 0.16.x series, you also need to pass the --with-libtorrent-rasterbar0.16 option to configure. qBittorrent v3.3.x has dropped the support of libtorrent 0.16.x.
  • If you want to compile with qt4 instead of qt5, you also need to pass the --with-qt4 option to configure. qBittorrent v4.0.x has dropped the support of qt4

Running qBittorrent

If you get an error similar to qbittorrent: symbol lookup error: qbittorrent: undefined symbol: Simply run:

The following method is too complex, but if you want to know what’s going on, then you can read the following method (see https://github.com/qbittorrent/qBittorrent/issues/8047):

Check if your LD_LIBRARY_PATH environment variable is set and the path /usr/local/lib is included.

Simply run env in your terminal and look for LD_LIBRARY_PATH. If so, you are good to go. If not, add the path to the variable:

Notes

  • If you experience any problem with this how to, do not hesitate to contact me at sledgehammer999(at)qbittorrent(dot)org.

Refer: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qBittorrent-on-Debian-and-Ubuntu#Compiling_qBittorrent_with_the_GUI


0 条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据