静看光阴荏苒
不管不顾不问不说也不念

Debian10编译打包qbittorrent4.2

期待已久的qb4.2终于发布了!从4.2版本起正式支持libtorrent-rasterbar1.2。

对于刷子来说最有用的一个更新是可以在WEBUI上调整一些libtorrent-rasterbar的参数了,尤其是硬盘缓存/做种模式等等。这些可设置项根据自己的机器硬件配置适当调整就和deluge的ltconfig插件一样,上一张预览图:

编译qbittorrent4.2建议直接上Debian10,旧系统包括Debian9在内因为官方存储库内的QT库版本过低(至少要5.9)将导致编译失败。

开始之前,我先把自己打包好的deb发出来,你不想编译的话可以直接在Debian10上使用我打包好的deb安装,省时省力:

wget https://lala.im/static/script/libtorrent-rasterbar_1.2.2_amd64.deb
wget https://lala.im/static/script/qbittorrent-nox_4.2.0_amd64.deb
dpkg -i libtorrent-rasterbar_1.2.2_amd64.deb
dpkg -i qbittorrent-nox_4.2.0_amd64.deb
apt -f install

这样就安装好了,你可以在终端内使用下面的命令启动qb:

qbittorrent-nox

放到后台运行参考文末的systemd配置,这里不多叙述。

下面是编译和打包过程,安装依赖:

apt -y update
apt -y install build-essential zlib1g-dev pkg-config automake \
libtool libboost-dev libboost-system-dev libboost-chrono-dev \
libboost-random-dev libssl-dev libgeoip-dev qtbase5-dev \
qttools5-dev-tools libqt5svg5-dev

如果要打包的话这里我选择用fpm,所以额外安装fpm,不打包的话可以略过:

apt -y install ruby ruby-dev rubygems build-essential
gem install fpm

下载libtorrent-rasterbar源码:

wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_2/libtorrent-rasterbar-1.2.2.tar.gz
tar -xzvf libtorrent-rasterbar-1.2.2.tar.gz
cd libtorrent-rasterbar-1.2.2/
./configure --enable-encryption --disable-debug CXXFLAGS="-std=c++14"
make -j$(nproc)

不打包直接安装的话执行:

make install
ldconfig -v

打包的话在make后不要执行make install,换成下面的命令,将libtorrent-rasterbar安装到临时目录:

mkdir -p /tmp/libtorrent-rasterbar
make install DESTDIR=/tmp/libtorrent-rasterbar

之后使用fpm创建deb:

fpm -s dir -t deb \
-C /tmp/libtorrent-rasterbar \
-m "imlala <1062951199@qq.com>" \
--url "https://www.lala.im" \
--description "Development files for libtorrent-rasterbar" \
--vendor "imlala" \
-n libtorrent-rasterbar \
-v 1.2.2 \
-p libtorrent-rasterbar_1.2.2_amd64.deb \
usr/local

接下来编译qb:

cd
wget https://github.com/qbittorrent/qBittorrent/archive/release-4.2.0.tar.gz
tar -xzvf release-4.2.0.tar.gz
cd qBittorrent-release-4.2.0/
./configure --prefix=/usr --disable-gui CXXFLAGS="-std=c++14"
make -j$(nproc)

同理,不打包直接安装的话执行:

make install
ldconfig -v

打包的话在make后不要执行make install,换成下面的命令,将qbittorrent-nox安装到临时目录:

mkdir -p /tmp/qbittorrent-nox
make install INSTALL_ROOT=/tmp/qbittorrent-nox

之后使用fpm创建deb:

fpm -s dir -t deb \
-C /tmp/qbittorrent-nox \
-m "imlala <1062951199@qq.com>" \
--url "https://www.lala.im" \
--description "bittorrent client based on libtorrent-rasterbar (without X support)" \
--vendor "imlala" \
-n qbittorrent-nox \
-v 4.2.0 \
-p qbittorrent-nox_4.2.0_amd64.deb \
-d "libtorrent-rasterbar >= 1.2.2" \
-d "zlib1g-dev >= 1:1.2.0" \
-d "libstdc++6 >= 5.2" \
-d "libqt5xml5 >= 5.2.0" \
-d "libqt5network5 >= 5.9.0~beta" \
-d "libqt5core5a >= 5.11.0~rc1" \
-d "libboost-system1.67.0" \
usr/

systemd配置:

nano /etc/systemd/system/qbittorrent-nox.service

写入:

[Unit]
Description=qBittorrent Daemon Service
After=network.target

[Service]
User=root
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox

[Install]
WantedBy=multi-user.target

管理:

systemctl start qbittorrent-nox.service
systemctl enable qbittorrent-nox.service
赞(5)
未经允许不得转载:荒岛 » Debian10编译打包qbittorrent4.2
分享到: 更多 (0)

评论 17

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    lala啥时候出个v2的中转教程 :idea:

    橘子4年前 (2019-12-07) Google Chrome 75.0.3770.85 Google Chrome 75.0.3770.85 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 呼叫lala移步聊天室 :cry:

      橘子4年前 (2019-12-08) Google Chrome 75.0.3770.123 Google Chrome 75.0.3770.123 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 我不会中转我会中出 :cool:

      LALA4年前 (2019-12-09) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    有安装之前版本的话,如何升级?正在做种,所以直接重装系统不太可行

    tt4年前 (2019-12-12) Google Chrome 78.0.3904.108 Google Chrome 78.0.3904.108 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 已升级成功,连历史上传都继承了,惊了。。

      tt4年前 (2019-12-12) Google Chrome 78.0.3904.108 Google Chrome 78.0.3904.108 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 那还是挺不错的,要是我的话不会升级,因为这个4.2相比之前的版本是一个非常多改动的版本,升级容易出问题。

        LALA4年前 (2019-12-13) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    webui有rss功能了吗?

    jbo4年前 (2020-02-02) Google Chrome 79.0.3945.136 Google Chrome 79.0.3945.136 Android 9 Android 9回复
    • 没注意看。。

      LALA4年前 (2020-02-03) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    博主有空能帮打包下最新的4.2.1嘛 辛苦辛苦 :oops: :oops:

    tyhunter4年前 (2020-03-02) Google Chrome 82.0.4068.5 Google Chrome 82.0.4068.5 Mac OS X  10.15.3 Mac OS X 10.15.3回复
  5. #5

    哎呦,我还妄图用阿里云玩一下,真是被这墙折磨服了!

    Star4年前 (2020-10-20) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 GNU/Linux x64 GNU/Linux x64回复
  6. #6

    执行“dpkg -i libtorrent-rasterbar_1.2.2_amd64.deb”报错“dpkg-query: 软件包 libtorrent-rasterbar 没有被安装
    通过 dpkg –contents (= dpkg-deb –contents) 来列出档案文件清单”???

    Star4年前 (2020-10-20) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 GNU/Linux x64 GNU/Linux x64回复
    • 你是想自己打包还是装我现成的那个deb装不上去?

      LALA4年前 (2020-10-21) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 GNU/Linux x64 GNU/Linux x64回复
      • 装您现成的吧,本来想自己编译安装,发现ali云clone github的话太慢了,直接安装您的deb也是不行的,但是我可以先把两个deb git到本地,然后上传到ali云吗?在执行下面命令会报加载共享库时出错。估计换境外的机子会流畅完成,我就是正好有个大盘快到期了想玩玩。

        还有个问题,我在您的博客留言很多次,一直没有收到邮件以为您没回复,今天来看发现回复了,但邮件没有提醒,是网站邮件系统坏掉了吗?大佬检查一下。 :smile:

        Star4年前 (2020-10-21) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 GNU/Linux x64 GNU/Linux x64回复
        • 没有设置回复邮件提醒这个功能。如果你不挑剔版本的话,直接装官方源里面的就行了,就一条命令:apt -y install qbittorrent-nox

          LALA4年前 (2020-10-22) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 GNU/Linux x64 GNU/Linux x64回复
          • 昨晚搞定了已经,灰常感谢,那我就时不时上来查看一下吧。 :oops:

            Star4年前 (2020-10-22) Firefox 81.0 Firefox 81.0 Android 10 Android 10
  7. #7

    Failed to start qbittorrent-nox.service: Unit qbittorrent-nox.service failed to load properly: Bad message.
    See system logs and ‘systemctl status qbittorrent-nox.service’ for details.

    唐风月3年前 (2020-11-22) Google Chrome 87.0.4280.66 Google Chrome 87.0.4280.66 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿