为什么80%的码农都做不了架构师?>>>   

rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能、低资源,另外有不少人给rtorrent开发了Web GUI来更好的让用户控制管理rtorrent,总而言之在Linux平台下,rtorrent是一个不错的BT下载解决方案。
  rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能、低资源,另外有不少人给rtorrent开发了Web GUI来更好的让用户控制管理rtorrent,总而言之在Linux平台下,rtorrent是一个不错的BT下载解决方案。
  rtorrent已被添加进Ubuntu源中,在Ubuntu下安装rtorrent非常容易,一句话即可安装:
  $sudo apt-get install rtorrent
  但是这里要写的是编译安装rtorrent的笔记记录,在这个编译安装过程中可以学习到一些关于编译安装源码的简单经验。在这里所用到的是全新安装的Ubuntu 8.10,以此为例来进行编译安装的学习。
  首先在rtorrent官方Wiki中的Install条目中给出了安装步骤:
  cd /home/rtorrent
  svn co svn://rakshasa.no/libtorrent/trunk
  cd /home/rtorrent/trunk
  svn up
  cd libtorrent
  ./autogen.sh
  ./configure
  make
  make install
  cd ../rtorrent
  ./autogen.sh
  ./configure
  make
  make install
  在一个全新安装的Ubuntu下还未安装subversion,无法使用svn获取最新源码,所以我们需要安装subversion:
  $sudo apt-get install subversion
  在/home下创建一个文件夹需要提权:
  $cd /home
  $sudo mkdir rtorrent
  然后根据rtorrent wiki的Install条目进行下一步:
  $cd /home/rtorrent
  由于svn获取源码写入/home/rtorrent也需要提权:
  $sudo svn co svn://rakshasa.no/libtorrent/trunk
  接下来就会下载一堆源码,下载完成后接着进行下一步: 
  $cd /home/rtorrent/trunk
  想要查看通过svn获得的源码版本使用命令:
  $sudo svn up
  这条命令会返回版本号,由于编译软件需要编译器,所以我们在这一步就需要安装编译器先:
  $sudo apt-get install build-essential
  安装完编译器之后进行接下来的步骤:
  $sudo ./autogen.sh
  应该会返回信息:aclocal not found,这是因为需要安装automake:
  $sudo apt-get install automake
  安装完automake之后再重复上一步:
  $sudo ./autogen.sh
  应该会返回信息:
  aclocal...
  configure.ac:22: warning: macro `AM_DISABLE_STATIC' not found in library
  configure.ac:23: warning: macro `AM_PROG_LIBTOOL' not found in library
  autoheader...
  libtoolize... libtoolize nor glibtoolize not found
  这是因为未安装libtool软件包,一句话安装:
  $sudo apt-get install libtool
  安装完libtool之后再重复上一步:
  $sudo ./autogen.sh
  应该会返回信息:
  aclocal...
  autoheader...
  libtoolize... using libtoolize
  automake...
  configure.ac:23: installing `./config.guess'
  configure.ac:23: installing `./config.sub'
  configure.ac:18: installing `./install-sh'
  configure.ac:18: installing `./missing'
  src/Makefile.am: installing `./depcomp'
  autoconf...
  ready to configure
  接下来进行下一步: 
  $sudo ./configure
  将会开始检查环境、配置,应该会返回信息:
  checking for OPENSSL... configure: error: Package requirements (openssl) were not met:
  Consider adjusting the PKG_CONFIG_PATH environment variable if you
  installed software in a non-standard prefix.
  Alternatively, you may set the environment variables OPENSSL_CFLAGS
  and OPENSSL_LIBS to avoid the need to call pkg-config.
  See the pkg-config man page for more details.
  通过Google搜索结果中,都说的是在这里需要告诉pkg-config这个openssl的相关配置文件(.pc)的位置,通常已安装的软件和包的.pc文件都会出现在/usr/lib/pkg-config下,但我在这里没有找到openssl的.pc文件,并且通过使用命令$sudo apt-get install openssl发现openssl是已安装了的,到这一步就停滞不前了。最后在Ubuntu的package网站里搜索到一个相关的包是libssl- dev,安装这个包:
  $sudo apt-get install libssl-dev
  安装完libssl-dev之后再接着重复上一步$sudo ./configure又会收到和之前类似的信息,只是这回返回的是:
  checking for STUFF... configure: error: Package requirements (sigc++-2.0) were not met:
  No package 'sigc++-2.0' found
  再次通过Ubuntu的Package网站里搜索到相关软件包是libsigc++-2.0,所以需要安装这个包:
  $sudo apt-get install libsigc++-2.0-dev

如果还是不行的话安装这个包libcurl4-openssl-dev

$sudo apt-get install libsigc++-2.0-dev

  安装完这个包之后再重复执行$sudo /.configure,可以顺利完成了,接下来的步骤:
  $sudo make
  $sudo make install

sudo ldconfig
  $cd ../rtorrent
  $sudo ./autogen.sh
  $sudo ./configure
  返回*** The ncurses library is required!,安装ncurses开发包:
  $sudo apt-get install ncurses-dev libncursesw5-dev
  重复$sudo ./configure,再返回信息checking for libcurl... configure: error: Package requirements (libcurl >= 7.15.4),安装libcurl开发包(libcurl-dev是由libcurl4-openssl-dev提供的虚拟软件包):
  $sudo apt-get install libcurl4-openssl-dev
  重复$sudo ./configure,可以顺利完成并且进行下一步了:
  $sudo make
  $sudo make install
  至此rtorrent编译安装就完成了,在这次编译安装rtorrent可以学习到以下基础经验:
  编译所需的东西是首先要安装好的:
  $sudo apt-get install build-essential automake libcurl4-openssl-dev
  在进行./configure步骤出现找不到的包的情况下先将Package requirement后括号中的关键字词记下来,在Ubuntu Package(http://packages.ubuntu.com/) 搜索一下,就可以知道如何通过apt-get来安装哪个包了。通常情况下所需要安装的是相关包的开发包,所以通常安装的是***-dev这样子的包,比如之前的openssl就是一个典型,编译需要用到openssl的开发包libssl-dev。另外编译安装软件之前应该有个好习惯,是这次编译安装所获得的经验,那就是至少应该先读一读svn下载下来的源码中的README文本文件,在libtorrent目录下的README(用nano README命令打开文本文件)中已说明了库依赖(LIBRARY DEPENDENCIES)libsigc++ 2.0(deb:libsigc++-2.0-dev),g++ >=3.3,而rtorrent目录下的README文本文件里说明了所需库依赖文件是libcurl >=7.12.0,ncurses。所以如果编译之前先阅读了这些说明文件,至少可以事先安装好所需库文件包。

安装rtorrent过程中使用 ./configure --with-ncursesw 选项好像也无法改变 生成Makefile文件中仍然为LIBS = -lncurses -lsigc-2.0   -lcurl   -L/usr/local/lib -ltorrent,这时需要将所有的Makefile文件都手工改为LIBS = -lncursesw -lsigc-2.0   -lcurl   -L/usr/local/lib -ltorrent,尤其是src目录及其子目录下面的Makefile修改完毕后make一下,如果出现can't find lncursesw ,sudo apt-get install libncursesw5-dev,需要检查一下/usr/lib/libncursesw.so文件,如果没有需要

ln -sfv /lib/libncursesw.so.5 /usr/lib/libncursesw.so 前提是已经存在libncursesw.so.5 或 libncursesw.so.5.7

make

makinstall

OK 这样rtorrent就不会有乱码

InstallingBuilding

./configure; make; make install

Building from latest development version (trunk)

(note: you need to have SVN installed)

Before the first use, you have to get the latest trunk version. This needs to be done only once. In this example, the directory in which you store the sources is /home/rtorrent/trunk

cd /home/rtorrentsvn co svn://rakshasa.no/libtorrent/trunk

Then, everytime you want to update your copy and recompile libTorrent and rTorrent:

cd /home/rtorrent/trunksvn upcd libtorrent./autogen.sh./configuremakemake installcd ../rtorrent./autogen.sh./configuremakemake install

(hint: you can put that in a file and run it everytime you want to recompile from trunk)

If it doesn't work, make sure you have a recent version of autotools. See also CompilationHelp.

libtorrent.so.5: cannot open shared object file: No such file or directory

Make sure you have $prefix/lib in either your /etc/ld.so.conf or LD_LIBRARY_PATH, where $prefix is where you installed libtorrent. To update the ld cache, run "ldconfig".

Non-blocking hostname lookup in curl

RTorrent will block on hostname lookup during tracker requests and http downloads. You can avoid this by compiling libcurl with 'cares' support, though this will be fixed later by using seperate threads within rTorrent.

后来又安装rTorrentWeb时配置~/.rtorrent.rc文件,添加scgi_port = localhost:5000参数后,重启rtorrent报错,rtorrent:XMLRPC not supported ,究其原因原来编译安装rtorrent时没有把xmlrpl的功能编译进来后来根据这篇文件的提示 安装xmlrpc后 编译rtorrent时加上了./configure --with-xmlrpc-c编译选项终于成功

2010-12-23 今天安装rtorrent-0.8.7.tar.gz , libtorrent-0.12.7.tar.gz的时候

/rtorrent/trunk/libtorrent# ./autogen.sh

aclocal...configure.ac:20: warning: macro `AM_PATH_CPPUNIT' not found in library

./autogen.sh  提示 warning: macro `AM_PATH_CPPUNIT' not found in library,查阅资料发现缺少cppunit

apt-get install libcppunit-dev 安装完毕再次执行autogen.sh搞定

make rtorrent 时最后编译main.o出现错误 /usr/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line

手工添加/lib/libpthread.so.0执行成功

libtool --tag=CXX   --mode=link g++  -g -O2 -g -DDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include     -I/usr/local/include   -I/usr/local/include    -o rtorrent main.o libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw  -lsigc-2.0   -lcurl   -L/usr/local/lib -ltorrent   -L/usr/local/lib   -lxmlrpc_server -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok -L/lib lib/libpthread.so.0

转载于:https://my.oschina.net/dclink/blog/115870

在Ubuntu下rtorrent编译安装笔记相关推荐

  1. android rtorrent 编译,在Ubuntu下rtorrent编译安装笔记

    rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能.低资源,另外有不少人给rtorrent开发了Web GUI来更好的让用户控制管理rtorrent,总而言之在Linux平台 ...

  2. ubuntu下ffmpeg编译安装

    ubuntu下ffmpeg编译安装 解决库链接不上的问题 ubuntu下ffmpeg编译安装   1.ffmpeg是什么东西?相信很多人第一次接触这个东西,我先在这里做个简单的介绍. FFmpeg是一 ...

  3. ubuntu下voltdb编译安装

    voltdb的代码以及系统构建都是在64位的linux/OS X之上的,它的编译需要如下环境: java 1.8 Apache Ant 1.7 或者更高版本 一个支持C++11的编译器 Python  ...

  4. Ubuntu 下 libev编译安装

    下载源码,以及编译安装: cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libev sh autogen.sh ./conf ...

  5. opencv3.2 在Ubuntu下的编译安装

    网上也看到很多人写的编译方法,应该也都是可以的,只是不知道是否权威,我找到了官方的编译安装指导,原文链接为 http://docs.opencv.org/trunk/d7/d9f/tutorial_l ...

  6. ubuntu php png,[工作记事]Ubuntu下PHP编译安装以及添加jepg支持

    安装依赖 sudo apt-get install libxml2 libxml2-dev sudo apt-get install libssl-dev apt-get install libgtk ...

  7. OpenCV在Linux下的编译安装(Ubuntu )

    OpenCV在Linux下的编译安装(Ubuntu ) 1.先安装相关的库: sudo apt-get install build-essential sudo apt-get install lib ...

  8. Ubuntu 下 Janus Server 搭建笔记

    1 简介 Janus 是一个开源的,通过 C 语言实现了对 WebRTC 支持的 Gateway:Janus 自身实现得很简单,提供插件机制来支持不同的业务逻辑,配合官方自带插件就可以用来实现高效的 ...

  9. kbe之ubuntu下的编译

    感觉之前的博客已经整理了大多数之前的关于基础的私人笔记, 现在应该可以讨论一下实操的东西了. 先来一发之前的kbe在ubuntu下的编译笔记吧, 因为官方对于ubuntu下的kbe编译文档是有问题的. ...

最新文章

  1. lucene底层数据结构——FST,针对field使用列存储,delta encode压缩doc ids数组,LZ4压缩算法...
  2. 【PM模块】预防性维护(上)
  3. netty系列之:netty初探
  4. android 4个布局,Android - 4种基本布局
  5. Stomp-Spring服务器端的Web套接字Java客户端
  6. C#中变量(成员变量、局部变量、全局变量)的作用域
  7. C/C++ ltoa函数 - C语言零基础入门教程
  8. 不同型号的二极管模块并联_电阻可以串联,为何二极管不适合串联?
  9. idea开发搭建scala项目流程(二)
  10. MYSQL互为主从同步(Windows)
  11. 零基础带你学习MySQL—加密函数和系统函数(十六)
  12. MATLAB 中BP神经网络算法用于回归拟合的实现
  13. c语言实现 网络嗅探程序代码,C语言实现网络嗅探器
  14. 数学建模层次分析法例题及答案_【数模】层次分析法 - 全国大学生数学建模竞赛(CUMCM) - 数学建模社区-数学中国...
  15. 搭建ASP环境-win7安装IIS并运行ASP程序
  16. git中rejected的解决方法
  17. FLV无损转换MP4
  18. 浅析中国综艺的营销策略
  19. 大一新生计算机强化训练小结,大一新生军训个人小结
  20. LeetCode——Symmetric Tree

热门文章

  1. macOS安装mysql后,进入mysql出现command not found
  2. python对日期型数据排序_如何对日期执行数学运算并用Python对它们进行排序?
  3. 怎么卡我的世界服务器物品,我的世界怎么卡服务器物品 | 手游网游页游攻略大全...
  4. java逆序对距离之和,七天刷完剑指offer-【第27道-第37道】
  5. java单例默认_Spring bean为什么默认是单例
  6. Mysql Literal(文字,既常量)
  7. 3.2 选择最可能的句子
  8. Python string字符串
  9. Pandas 求余运算
  10. freecplus框架-日期、时间和计时器