海运的博客

debian11或pve编译安装最新版qbittorrent-nox

发布时间:February 5, 2023 // 分类: // No Comments

安装编译环境:

apt install build-essential pkg-config automake libtool

编译libtorrent-rasterbar-1.2.18:

apt install libboost-system-dev libssl-dev
#也可使用git clone最新代码
#git clone --branch RC_1_2 --depth=1 --recurse-submodules https://github.com/arvidn/libtorrent.git
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.18/libtorrent-rasterbar-1.2.18.tar.gz
tar zxf libtorrent-rasterbar-1.2.18.tar.gz 
cd libtorrent-rasterbar-1.2.18/  
./configure --prefix=/usr/local/libtorrent-1.2.18 CXXFLAGS=-std=c++14  
make -j$(nproc) && make install

编译qbittorrent-nox4.5.0:

apt install qtbase5-dev qttools5-dev libqt5svg5-dev zlib1g-dev
#也可使用git clone最新代码
#git clone --branch v4_5_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.5.0.tar.gz
tar zxf release-4.5.0.tar.gz 
cd qBittorrent-release-4.5.0/  
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.18/include/               
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.18/lib/pkgconfig
./configure --prefix=/usr/local/qbittorrent-4.5.0 --disable-gui 
make -j$(nproc) && make install

qbittorrent 4.5.0版本web不能显示中文解决:

sed -i 's/value="zh">/value="zh_CN">/' src/webui/www/private/views/preferences.html

如只安装一个版本的libtorren启动qbittorrent:

echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
/usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

多个版本libtorren:

LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/ /usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

systemd service添加:

Environment="LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/"

用cmake编译libtorrent-2.0版本及qbittorrent4.5.0:

apt install cmake ninja-build
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-2.0.8 -DCMAKE_CXX_STANDARD=14 
cmake --build build
cmake --install build
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-2.0.8/include/              
export PKG_CONFIG_PATH=/usr/local/libtorrent-2.0.8/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.0-lt20 -DGUI=OFF -DSTACKTRACE=OFF 
cmake --build build
cmake --install build

debian11使用qt6编译qbittorrent,需开启bullseye-backports源:

apt install qt6-base-dev qt6-tools-dev zlib1g-dev -t bullseye-backports
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.1 -DGUI=OFF -DSTACKTRACE=OFF -DQT6=ON

如要在其它机器上运行需安装依赖:

apt install libqt6network6 libqt6sql6 libqt6xml6 libqt6core6 -t bullseye-backports 

libtorrent-2.0.8使用注意,默认磁盘io类型为内存映射文件,qbittorrent占用shr内存很大,且关闭系统缓存后下载上传很慢。
将磁盘io更改为posix无此问题。

经典版本4.3.9:

#wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
#tar zxf libtorrent-rasterbar-1.2.14.tar.gz 
#cd libtorrent-rasterbar-1.2.14/
git clone --branch RC_1_2 https://github.com/arvidn/libtorrent.git
cd libtorrent
#qbittorrent4.39发布时使用的libtorrent版本
git checkout 28ebc276224021d93d958e2f2de445c35898a23e
git submodule update --init --recursive
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-1.2.14 -DCMAKE_CXX_STANDARD=14 
cmake --build build  
cmake --install build
git clone --branch v4_3_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent/
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.14/include/  
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.14/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.3.9 -DGUI=OFF -DSTACKTRACE=OFF
cmake --build build  
cmake --install build

https://web.archive.org/web/20211102073721/https://www.qbittorrent.org/download.php
https://github.com/qbittorrent/qBittorrent/wiki#compilation
https://github.com/qbittorrent/qBittorrent/wiki/Compilation:-Debian-and-Ubuntu
https://github.com/qbittorrent/qBittorrent/wiki/Compilation-with-CMake:-common-information
https://github.com/arvidn/libtorrent/blob/RC_2_0/docs/building.rst#building-with-cmake

标签:qbittorrent

发表评论

分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...