Debian9编译安装Deluge2.0.3+Libtorrent1.2.1
安装编译所需的依赖/包:
apt -y install build-essential pkg-config automake libtool python3-pip apt -y install libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libboost-python-dev libssl-dev libgeoip-dev
编译libtorrent,编译参数注意加上Python3的路径,这样是把libtorrent的binding编译到Python3而不是默认的Python2:
wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_1/libtorrent-rasterbar-1.2.1.tar.gz tar -xzvf libtorrent-rasterbar-1.2.1.tar.gz cd libtorrent-rasterbar-1.2.1 ./configure --enable-encryption --enable-python-binding --with-libiconv --with-libgeoip=system CXXFLAGS=-std=c++11 PYTHON=/usr/bin/python3 make -j8 make install ldconfig
使用pip3安装Deluge所需的依赖/包:
pip3 install twisted pyopenssl simplejson pyxdg chardet geoip setproctitle pillow mako service_identity
注意之前说过Deluge2.0是支持Python3的,所以这里我们也会使用Python3来安装Deluge:
wget https://ftp.osuosl.org/pub/deluge/source/2.0/deluge-2.0.3.tar.xz tar -xJf deluge-2.0.3.tar.xz cd deluge-2.0.3 python3 setup.py build python3 setup.py install
目前我遇到的一个坑是报这个错:
error: pyasn1 0.1.9 is installed but pyasn1<0.5.0,>=0.4.6 is required by {'pyasn1-modules'}
执行下面的命令修复:
pip3 install --upgrade --force-reinstall pyasn1
重新安装一次就行了:
python3 setup.py install
新建deluged的systemd服务:
nano /etc/systemd/system/deluged.service
写入:
[Unit] Description=Deluge Bittorrent Client Daemon Documentation=man:deluged After=network-online.target [Service] Type=simple User=root Group=root UMask=007 ExecStart=/usr/local/bin/deluged -d Restart=on-failure # Time to wait before forcefully stopped. TimeoutStopSec=300 [Install] WantedBy=multi-user.target
新建deluge-web的systemd服务:
nano /etc/systemd/system/deluge-web.service
写入(注意现在Deluge的WEBUI也需要加上-d才是以daemon的方式运行):
[Unit] Description=Deluge Bittorrent Client Web Interface Documentation=man:deluge-web After=network-online.target deluged.service Wants=deluged.service [Service] Type=simple User=root Group=root UMask=027 # This 5 second delay is necessary on some systems # to ensure deluged has been fully started ExecStartPre=/bin/sleep 5 ExecStart=/usr/local/bin/deluge-web -d Restart=on-failure [Install] WantedBy=multi-user.target
管理命令:
systemctl start deluged systemctl start deluge-web systemctl enable deluged systemctl enable deluge-web
总体上来说的话,在Debian9上编译Deluge2.0是没什么大坑的,因为毕竟Debian9的Boost库和gcc编译器的版本都比较新,再加上自带Python3,所以编译起来还是挺容易的。
码字很辛苦,转载请注明来自非WEB-DL资源站的《Debian9编译安装Deluge2.0.3+Libtorrent1.2.1》
2020-09-15
软件
评论
评论关闭