Install rTorrent Using CURL in Different Path on Centos Linux
After I posted an article titled "Installing libTorrent and rTorrent on Linux Centos" one of my reader have a concern about dependencies as Centos already have older Curl installed by default.
One way to avoid dependencies problem with Curl is by compiling the newest version to another directory and then compile rTorrent to use that Curl installation and not the old Curl installed by default on Centos. Below is the step-by-step how to install rTorrent with Curl installed in another directory:
yum install gcc gcc-c++ m4 make automake libtool pkgconfig perl openssl-devel ncurses-devel
Download curl, libsigc++, libtorrent and rtorrent
wget http://curl.haxx.se/download/curl-7.19.7.tar.gz wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.4.tar.gz wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz
Extract curl, libsigc++, libtorrent and rtorrent
tar -xvzf curl-7.19.7.tar.gz tar -xvzf libsigc++-2.2.4.tar.gz tar -xvzf libtorrent-0.12.5.tar.gz tar -xvzf rtorrent-0.8.5.tar.gz
Compile Curl in /opt/curl
cd curl-7.19.7 ./configure --prefix=/opt/curl make make install
Compile libsigc++ in /opt/libsigc
cd libsigc++-2.2.4 ./configure --prefix=/opt/libsigc make make install ln -s /opt/libsigc/lib/pkgconfig/sigc++-2.0.pc /usr/lib/pkgconfig/sigc++-2.0.pc
Compile libTorrent
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cd libtorrent-0.12.5 rm -f scripts/{libtool,lt*}.m4 ./autogen.sh ./configure make make install
Compile rTorrent using our compiled curl
cd rtorrent-0.8.5 rm -f scripts/{libtool,lt*}.m4 ./autogen.sh ./configure libcurl_CFLAGS=-I/opt/curl/include libcurl_LIBS='-L/opt/curl/lib -lcurl -L/usr/kerberos/lib -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz' make make install
Download rtorrent sample configuration and rename it
wget http://libtorrent.rakshasa.no/export/1105/trunk/rtorrent/doc/rtorrent.rc mv rtorrent.rc .rtorrent.rc
You have to modify the content of .rtorrent.rc file to configure the settings of rTorrent as you needed and place the file into your user directory.
To download from torrent we need the .torrent file, for example to download Centos 5.4 DVD installation I run the command:
rtorrent http://ftp.nluug.nl/ftp/pub/os/Linux/distr/CentOS/5.4/isos/i386/CentOS-5.4-i386-bin-DVD.torrent

The screenshot of rTorrent downloading file
December 22nd, 2009 - 02:54
Hi Markus, thanks for the reply and second how-to!! It’s great and working fine. I have learnt so much already, out of curiosity would it be possible to statically link the libaries when building rtorrent? This way i only need to copy the rtorrent executable without needing to copy libaries if i distrbute rtorrent to another centos box… more out of interest really to see how its done! Many thanks, Chris.
December 22nd, 2009 - 13:20
i don’t think it’s possible, anyway it doesn’t take long to compile rtorrent. you can try to create a bash script to automate the compiling task.
January 29th, 2010 - 00:45
In the compile libtorrent script shouldn’t it be
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
?
Otherwise libsigc++ wont be found.
January 29th, 2010 - 01:52
indeed there are files in /usr/lib/pkgconfig, but if i set PKG_CONFIG_PATH to /usr/lib/pkgconfig, I got error message when compiling rtorrent that said the configure script couldn’t find libtorrent installation.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
fix this problem.