./utserver: /usr/lib64/libssl.so.1.0.0: no version information available (required by ./utserver)Here is a solution to run utorrent server standalone on any 64 bit distribution without using/touching the system's libraries (hence no dependencies). The trick is to collect all the required libraries separately and run utorrent using those in isolation from the system. Here are the steps:
./utserver: /usr/lib64/libcrypto.so.1.0.0: no version information available (required by ./utserver)
./utserver: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./utserver)
First collect the required libraries, the list is not huge, utorrent binary (utserver) only has a few dependecies namely:
glibc, libgcc, libselinux, libkeyutils, libssl, libcomerr, libkrb5, zlibSo what we are going to do is to collect all these pre-compiled libraries from a newer distribution like Fedora-19-x64 or Ubuntu-12.04-x64 or any distribution that has the required newer libraries, you can collect them from the online software repositories or from where ever you feel comfortable.
I am going to use the safest (not the most convenient) option, get these libraries from Ubuntu server 12.04.2 (x64) distribution CD. I say it is the safest because the distributed utorrent package (Ubuntu 12.04 build x64 (27079)) is built on this version of Ubuntu, so one can be sure that libraries on this distro will meet the requirement (By the way, I tried this method using the packages from Fedora 19 and it worked perfectly fine).
Download the Ubuntu server 12.04.2 (x64) CD:
cdMount the CD:
wget http://releases.ubuntu.com/12.04.2/ubuntu-12.04.2-server-amd64.iso
mkdir /mnt/ubuntu12042Copy the required packages to the temporary location:
mount -o loop,ro /root/ubuntu-12.04.2-server-amd64.iso /mnt/ubuntu12042
mkdir /tmp/debs
cp /mnt/ubuntu12042/pool/main/g/gcc-4.6/libgcc1_4.6.3-1ubuntu5_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/k/krb5/libkrb5-3_1.10+dfsg~beta1-2ubuntu0.3_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/e/e2fsprogs/libcomerr2_1.42-1ubuntu2_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/z/zlib/zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/k/keyutils/libkeyutils1_1.5.2-2_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/libs/libselinux/libselinux1_2.1.0-4.1ubuntu1_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/e/eglibc/libc6_2.15-0ubuntu10.3_amd64.deb /tmp/debs/
cp /mnt/ubuntu12042/pool/main/o/openssl/libssl1.0.0_1.0.1-4ubuntu5.5_amd64.deb /tmp/debs/
Extract the packages:
cd /tmp/debs/Download utorrent:
for package in *.deb; do
ar p $package data.tar.gz | tar -zx
done
cdCopy the libraries from the extracted packages:
wget 'http://download.utorrent.com/linux/utorrent-server-3.0-ubuntu-12.04-27079.x64.tar.gz'
tar -xzf utorrent-server-3.0-ubuntu-12.04-27079.x64.tar.gz
mv ./utorrent-server-v3_0 /opt/utorrent
mv /tmp/debs/lib /opt/utorrent/That's it! Now you have the 64 bit utorrent in /opt/utorrent and all the required libraries in /opt/utorrent/lib. Now you can run utorrent using the following command:
#rm -rf /tmp/debs
/opt/utorrent/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --library-path /opt/utorrent/lib/x86_64-linux-gnu /opt/utorrent/utserver
In the following steps I'll setup a secure, proper and clean environment for utorrent running it with a limited user and with proper configuration, log and pid files etc.
Make the required directories in utorrent:
cd /opt/utorrentGet the default configuration file:
mkdir conf log pid settings webui data
mv webui.zip webui/
wget -O /opt/utorrent/conf/utserver.conf http://kxr.me/blog/uts/utserver.conf.customlibs.ubuntu64Get the control script (to start/stop/reload utorrent)
wget -O /opt/utorrent/utsctl http://kxr.me/blog/uts/utsctl.customlibs.ubuntu64Set the owner permissions:
chmod +x /opt/utorrent/utsctl
ln -s /opt/utorrent/utsctl /usr/local/bin/utsctl
(note I am using the utorrent user, but you can use any user. If you use a different user, update the shell_user variable in /opt/utorrent/utsctl accordingly)
useradd -d /opt/utorrentThere you go, if you did all the steps correctly, you should now be able to start utorrent server by:
chown -R utorrent.utorrent /opt/utorrent
utsctl startThe configuration file is located in:
(Note: after changing the configuration file do a "utsctl reload" for the new changes to take effect. Stopping and starting will not load the new changes.)
/opt/utorrent/conf/utserver.confDon' forget to set the user name, password and directories in the configuration file. Right now the configuration file we downloaded is set to download every thing in /opt/utorrent/data/ and the login credentials are:
user: admin
pass:
You can use the same exact steps to setup a stand alone 32 bit utorrent server that will run on both 64bit and 32bit systems without requiring any system library/dependency. In order to do so use the 32 bit ubuntu server 12.04.2 CD for the 32 bit pacakges and use the 32 bit utorrent package: Ubuntu 10.10 x86 (27079). Don't forget to set the lib_path variable in /opt/utorrent/utsctl to "/opt/utorrent/lib/i386-linux-gnu"
Suggestions and Comments are welcomed :)
I get the following error:
ReplyDeleteroot@KaliChad:/opt/utorrent# /opt/utorrent/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --library-path /opt/utorrent/lib/x86_64-linux-gnu /opt/utorrent/utserver
/opt/utorrent/utserver: error while loading shared libraries: /opt/utorrent/utserver: wrong ELF class: ELFCLASS32
Why is that? I am running debian OS 64 bit..
Also when doing:
ReplyDeleteroot@KaliChad:/opt/utorrent# utsctl status
Utorrent seems to be stopped, PID file /opt/utorrent/pid/utserver.pid not found or empty
Where do i get the PID file from?
This comment has been removed by the author.
ReplyDeleteThanks so much for this! Using this I was finally able to get utorrent running on Centos 6.4. Anyways, the new version of utorrent is based on Ubuntu 13.04 so a few things have changed. Since I used your blog to figure out how to get it working, I figured I would post the changes in case you want to make a new blog post for the latest version.
ReplyDeletecd /tmp
wget http://releases.ubuntu.com/13.04/ubuntu-13.04-server-amd64.iso
mkdir /mnt/ubuntu1304
ReplyDeletemount -o loop,ro /tmp/ubuntu-13.04-server-amd64.iso /mnt/ubuntu1304/
mkdir /tmp/debs
cp /mnt/ubuntu1304/pool/main/g/gcc-4.7/libgcc1_4.7.3-1ubuntu1_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/k/krb5/libkrb5-3_1.10.1+dfsg-4+nmu1_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/e/e2fsprogs/libcomerr2_1.42.5-1ubuntu4_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/z/zlib/zlib1g_1.2.7.dfsg-13ubuntu2_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/k/keyutils/libkeyutils1_1.5.5-4_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/libs/libselinux/libselinux1_2.1.9-5ubuntu1_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/e/eglibc/libc6_2.17-0ubuntu5_amd64.deb /tmp/debs
cp /mnt/ubuntu1304/pool/main/o/openssl/libssl1.0.0_1.0.1c-4ubuntu8_amd64.deb /tmp/debs
I think this is the only good guide for Centos 6.5. Thank you!
ReplyDeleteThank you so much for this, although with minor tweaks( ubuntu-12.04.2-server-amd64.iso is updated to ubuntu-12.04.4-server-amd64.iso on its servers, and few debs filenames changed too) everything else worked correctly.
ReplyDeleteAlso for those who can't mount iso (kernel doesn't support, etc...): you can use 7z.
Thanks for your guide, but when I run utserver this error appears: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
ReplyDeleteI do not know why this error occurs, please help me fix it, thank you :D
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteWelcome to https://www.btlcasino.com
ReplyDeleteleading online entertainment betting site that presents you with different online betting experiences, including sports betting, online casinos, live casino games, online poker, slot machines and more. https://www.omgqq.com
188bet.com Review 2021 (2021) - Topbet
ReplyDeleteOur 188bet review offers クイーンカジノ a complete overview of 188bet 188bet.com, its welcome bonuses, betting options and much more. Rating: 5 · Review 인카지노 by THTECH
Linux® is an open source operating system (OS). An operating system is the software that directly manages a system's hardware and resources, like CPU, memory, and storage. The OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work.
ReplyDelete