menu Thinking Null
qBittorrent编译记录
2020-10-03   C++ Ubuncrash Linux   1 条评论   1864 次阅读

Ubuntu自带的transmission不好用,种子下载完全没有速度,最重要的是不能设置代理!这还能叫下载软件,果断放弃,google一下其他下载软件。

Bitcomet 比特彗星

在用win10时曾经用过,功能强大,界面清爽,支持中文,可惜仅有 Windows / MacOS
wine是什么?不会真有人会用wine吧?

Transmission

界面就很GNOME,跟随系统支持暗色模式,可惜不能设置代理。

qBittorrent

接下来就轮到qBittorrent上场了,找了一圈,好像没有编译好的二进制文件,(垃圾机场把域名含torrent的网站都ban了,美其名曰防止版权争议),所以只好到github上拉源代码,自己编译。
其实有编译好的版本的 Github
但要整活总是有理由的!

开始了!

先下载源码包 https://github.com/qbittorrent/qBittorrent/releases
然后 ./configure本来以为会一切顺利,结果报错了

No package 'Qt5Svg' found
sudo apt install libqt5svg5-dev

当然,错误怎么可能只有一个?不愧是我

configure: error: Could not find a version of the Boost::System library!

emm...这是缺了boost ? 没错 ,Boost是一个cpp库,就像react是一个javascript库一样。
有人遇到了和我一样的问题 stackoverflow
安装,并指定boost目录解决问题

$ apt-get install libboost-filesystem-dev libboost-thread-dev
 $ apt-get install libboost-system-dev
# ./configure --with-boost-libdir=/usr/lib64

apt-get insatll......找不到匹配,只好再从源代码编译。

checking for libtorrent... no configure: error: Package requirements (libtorrent-rasterbar >= 1.1.10) were not met:

啊这?怎么还不行,apt有安装不了libtorrent,那就从 https://libtorrent.org 上寻求帮助。

 git clone --recurse-submodules https://github.com/arvidn/libtorrent.git
cd libtorrent/
mkdir build
cmake ..
sudo make 
sudo make install

找到qBittorrent目录,再 ./configure

configure: Good, the configure finished.

终于成功了!泪,拉了出来!差不多可以开始make了

SUDO make
噔噔咚,又报错了

/bin/sh: 1: lrelease-qt5: not found
make[1]: * [Makefile:1369:webui/www/translations/webui_ar.qm] 错误 127
make[1]: 离开目录“/qBittorrent-release-4.2.5/src”
make: * [Makefile:47:sub-src-make_first] 错误 2

那就补依赖 sudo apt-get install qttools5-dev-tools
这不就好起来了吗? ......又报错了。。。

In file included from base/bittorrent/magneturi.h:32,
                 from base/bittorrent/magneturi.cpp:29:
/usr/local/include/libtorrent/add_torrent_params.hpp:216:13: note: declared here
  216 |   sha1_hash info_hash;
      |             ^~~~~~~~~
compiling base/bittorrent/peeraddress.cpp
compiling base/bittorrent/peerinfo.cpp
compiling base/bittorrent/private/bandwidthscheduler.cpp
compiling base/bittorrent/private/filterparserthread.cpp
base/bittorrent/private/filterparserthread.cpp: In function ‘bool {anonymous}::parseIPAddress(const char*, boost::asio::ip::address&)’:
base/bittorrent/private/filterparserthread.cpp:99:39: error: ‘from_string’ is not a member of ‘boost::asio::ip::address_v6’
   99 |             address = lt::address_v6::from_string(data, ec);
      |                                       ^~~~~~~~~~~
make[1]: *** [Makefile:3198:filterparserthread.o] 错误 1

这不是代码的问题吗?谷歌了一下没结果,先留个坑,以后补上,即使没编译成功,还是有所收获的。

留坑待填

2020-10-03 20:51 星期六

本篇文章采用 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 许可协议进行许可。

转载或引用本文时请遵守许可协议,注明出处。

发表评论
已有 1 条评论
textsms
account_circle
email
link
    笑死
    笑死
    January 15th, 2022 at 07:55 pm

    笑死