记一下安装qBittorrent踩过的坑


环境:Centos 7.7

首先安装EPEL源:

1
yum -y install epel-release

安装开发工具包:

1
yum -y groupinstall "Development Tools"

安装编译所需的依赖和组件:

1
yum -y install wget git gcc gcc-c++ qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist

先编译安装libtorrent:

1
2
3
4
5
6
wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_2/libtorrent-rasterbar-1.2.2.tar.gz
tar -zxf libtorrent-rasterbar-1.2.2.tar.gz
cd libtorrent-rasterbar-1.2.2.tar.gz
./configure
make
make install

?

1
checking for boostlib >= 1.58... no

编译安装boost:

1
2
3
4
5
wget https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.gz
tar -zxvf boost_1_71_0.tar.gz cd boost_1_71_0
./bootstrap.sh
./b2 install
make && make install

编译qBittorrent:

1
git clone https://github.com/qbittorrent/qBittorrent.git ./configure

缺少qt5svg

1
yum install qt5-qtsvg-devel -y

重新编译:

1
make && make install

No package ‘libtorrent-rasterbar’ found

1
2
3
export LD_LIBRARY_PATH = "/usr/local/lib"
ln -s /usr/local/lib/libboost* /usr/lib/
./configure --with-boost-libdir=/usr/local/lib

configure: error: A compiler supporting C++14 is required.

1
2
3
yum install centos-release-scl-rh
yum install devtoolset-4-gcc devtoolset-4-gcc-c++
scl enable devtoolset-4 bash