【问题标题】:rtorrent compilation error : error: #include expects "FILENAME" or <FILENAME>rtorrent 编译错误:错误:#include 需要“文件名”或 <文件名>
【发布时间】:2020-10-17 13:36:44
【问题描述】:

我正在尝试从源代码安装 rtorrent,但在编译时出现错误。我正在开发一个新的 Ubuntu 20.04 虚拟机。

libtorrent 安装

sudo apt update
sudo apt upgrade -y
sudo apt install build-essential zip net-tools zlib1g-dev libssl-dev pkg-config libncurses-dev libncursesw5-dev libcppunit-dev autoconf automake libtool libcurl4-openssl-dev -y
cd /tmp
wget http://rtorrent.net/downloads/libtorrent-0.13.8.tar.gz
tar -zxvf libtorrent-0.13.8.tar.gz
cd libtorrent-0.13.8
bash autogen.sh
./configure
make -j 6
sudo make install

rtorrent 安装

cd /tmp
git clone https://github.com/rakshasa/rtorrent.git
cd rtorrent/
./autogen.sh
./configure
make -j 6

但是我得到一个错误。我在 google 上找不到任何有趣的东西。

/usr/local/include/torrent/poll.h:43:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
#include expects "FILENAME" or <FILENAME>

你可以找到所有的错误信息here on pastebin

有什么想法吗? 我忘记安装依赖了吗?

【问题讨论】:

    标签: compiler-errors torrent


    【解决方案1】:

    不要使用 wget 下载旧的 libtorrent 源,而是从 github 获取最新的:

    git clone https://github.com/rakshasa/libtorrent.git
    

    rtorrent 和 libtorrent 版本已保持同步,请查看 rtorrent 源中的 README 以获取兼容版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-23
      • 1970-01-01
      • 2013-01-18
      • 2018-05-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多