Advertisement
Paladinz2k

Build libtorrent from source

Jan 16th, 2016
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.50 KB | None | 0 0
  1. http://dev.deluge-torrent.org/wiki/Building/libtorrent#UbuntuDebian
  2.  
  3. Install dependencies for libtorrent build automatically using build-dep:
  4.  
  5. sudo apt-get build-dep libtorrent-rasterbar
  6. sudo apt-get install checkinstall
  7.  
  8. OR if that fails manually install them:
  9.  
  10. sudo apt-get install build-essential checkinstall libboost-system-dev libboost-python-dev libssl-dev libgeoip-dev
  11.  
  12. Download libtorrent (https://github.com/arvidn/libtorrent/releases) and extract:
  13.  
  14. tar xf libtorrent-rasterbar.tar.gz
  15. cd libtorrent-rasterbar
  16.  
  17. Configure:
  18.  
  19. ./configure --enable-python-binding --with-libgeoip --with-libiconv
  20.  
  21.     Missing configure script: (e.g. source code from git) create it with ./autotool.sh (requires extra packages: sudo apt-get install autoconf automake libtool).
  22.     Logging: Add --enable-logging=default to get logs in the current working directory. verbose and error can also be used.
  23.     Debug: To create a debug build add --enable-debug=yes.
  24.  
  25. Build:
  26.  
  27. make -j$(nproc)
  28.  
  29.     CPU Cores: The make option -j$(nproc) will utilize all available cpu cores.
  30.  
  31. Install library and python bindings:
  32.  
  33. sudo checkinstall
  34. sudo ldconfig
  35.  
  36. Substituted make install for checkinstall as it creates a deb package for easier removal/re-install by dpkg.
  37. Running ldconfig avoids an ImportError for libtorrent-rasterbar.so, a result of Python being unable to find the main library.
  38.  
  39. Verify libtorrent and the python bindings are installed correctly:
  40.  
  41. python -c "import libtorrent; print libtorrent.version"
  42. >> 1.0.6.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement