我正在运行 Fedora 21 操作系统,启用了“开发工具和创意套件”模块。
Linux maboiteaspam 3.17.8-300.fc21.x86_64 #1 SMP Thu Jan 8 23:32:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
我专门通过 yum 安装了 rb_libtorrent-devel
Paquets installés
Nom : rb_libtorrent-devel
Architecture : x86_64
Version : 1.0.2
Révision : 1.fc21
Taille : 3.8 M
Dépôt : installed
Depuis le dépôt : fedora
Résumé : Development files for rb_libtorrent
URL : http://www.rasterbar.com/products/libtorrent/
Licence : BSD and zlib and Boost
Description : The rb_libtorrent-devel package contains libraries and header files for
: developing applications that use rb_libtorrent.
:
: The various source and header files included in this package are licensed
: under the revised BSD, zlib/libpng, and Boost Public licenses. See the various
: COPYING files in the included documentation for the full text of these
: licenses, as well as the comments blocks in the source code for which license
: a given source or header file is released under.
我正在运行 node 和 node-gyp,
maboiteaspam [14:07:20] ~ node -v
v0.10.35
maboiteaspam [14:07:23] ~ node-gyp -v
v1.0.2
当我尝试安装 node-libtorrent 时,可以在这里找到https://github.com/fanatid/node-libtorrent,
npm i fanatid/node-libtorrent
我面临如下错误消息:
make: Entering directory '/home/maboiteaspam/Bureau/the-public-network/node_modules/node-libtorrent/build'
CXX(target) Release/obj.target/libtorrent/src/module.o
CXX(target) Release/obj.target/libtorrent/src/add_torrent_params.o
../src/add_torrent_params.cpp: In function ‘libtorrent::add_torrent_params nodelt::add_torrent_params_from_object(v8::Local<v8::Object>)’:
../src/add_torrent_params.cpp:48:21: erreur: no match for ‘operator=’ (operand types are ‘std::vector<char>’ and ‘std::vector<char>*’)
p.resume_data =& rd;
^
../src/add_torrent_params.cpp:48:21: note: candidate is:
In file included from /usr/include/c++/4.9.2/vector:69:0,
from /usr/include/libtorrent/add_torrent_params.hpp:37,
from ../src/add_torrent_params.cpp:4:
/usr/include/c++/4.9.2/bits/vector.tcc:167:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]
vector<_Tp, _Alloc>::
^
/usr/include/c++/4.9.2/bits/vector.tcc:167:5: note: no known conversion for argument 1 from ‘std::vector<char>*’ to ‘const std::vector<char>&’
../src/add_torrent_params.cpp:57:25: erreur: no match for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘std::vector<unsigned char>*’)
p.file_priorities =& fp;
^
../src/add_torrent_params.cpp:57:25: note: candidate is:
In file included from /usr/include/c++/4.9.2/vector:69:0,
from /usr/include/libtorrent/add_torrent_params.hpp:37,
from ../src/add_torrent_params.cpp:4:
/usr/include/c++/4.9.2/bits/vector.tcc:167:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
vector<_Tp, _Alloc>::
^
/usr/include/c++/4.9.2/bits/vector.tcc:167:5: note: no known conversion for argument 1 from ‘std::vector<unsigned char>*’ to ‘const std::vector<unsigned char>&’
libtorrent.target.mk:100: recipe for target 'Release/obj.target/libtorrent/src/add_torrent_params.o' failed
make: *** [Release/obj.target/libtorrent/src/add_torrent_params.o] Error 1
make: Leaving directory '/home/maboiteaspam/Bureau/the-public-network/node_modules/node-libtorrent/build'
如何克服这些问题并通过节点绑定使用 rb libtorrent ?