Page 1 of 1

qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Sun Oct 06, 2013 11:50 am
by ghostcow
Hey guys, I'm running Debian wheezy.
I compiled and installed qbittorrent and libtorrent downloaded from the website using your instructions, and everything seemed to go OK.

Then when I want to run it using 'qbittorrent' it exits immediately. Only when i run it as root with 'sudo qbittorrent' it runs.

How do I fix this?

Note: I still have qBittorrent v2.9.8 installed. That shouldn't create a problem, right?

Re: qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Sun Oct 06, 2013 12:00 pm
by sledgehammer_999
Does it output something in the terminal?

I would advice downloading the debian source package for qbittorrent v3.0.9 from experimental and building locally. This will produce a .deb that you can use it to install v3.0.9 on wheezy. Search the net on how to build from debian source packages.

Re: qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Sun Oct 06, 2013 4:04 pm
by Peter
What you said is a permission issue. You did not copy the files with "sudo make install", but used root to build everything. Thus you made a lot of files owned by root, which only root can execute. Simply CHOWN your folder (where the qb source/binary files are at). (***)
Like so: sudo chown -R yourusername:yourusername /home/yourusername/folder/to/qbittorrentsource/


It will launch then... but please, read on:

On Debian there are (at least) two convenient ways of installing stuff.

1) If you want just a newer package, and you do NOT want to apply your own patch, your own configure options, etc.
Use APT-Pinning. It can grab packages and dependencies (only those), from testing/sid/experimental. And it won't mess your system up.

https://wiki.debian.org/AptPreferences
http://jaqque.sbih.org/kplug/apt-pinning.html

2) If you want to apply your own patch, or the apt-pinning method does not work for you, you can use `pbuilder`.
It is a tool that will grab all the dependencies, install them into a virtual environment, and create the package.
And nothing will happen on your physical machine (e.g.: It remains untouched), except you will have your package built.

https://wiki.ubuntu.com/PbuilderHowto

You can download Debian source packages with dget.
> su
> $ apt-get install debian-goodies

then you go up to the debian online repository and open a package, such as http://packages.debian.org/sid/qbittorrent
There will be a .dsc file there.
Copy link, and use a terminal:
dget -x -u http://ftp.de.debian.org/debian/pool/ma ... .9.8-1.dsc

It will download every patch, debian file, and the source. Even unpack it for you.
After this, give it to pbuilder and you are done.


It may sound complicated but once you learn it, it's real easy. (And well, you use Linux, you should know your OS.)

(***) = The compile consists of basically three basic steps.
0 _optional_) Apply any patches you need, want.
1) ./configure --with-what-you-want --prefix=/usr
(implying you want to put it under /usr... that's the default, though. but if you install it there, it will overwrite your current install!)
2) make
3) sudo make install

(Only the last needs root permissions.)

Re: qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Sun Oct 06, 2013 5:11 pm
by sledgehammer_999
For 3.0.9-> http://packages.debian.org/experimental/qbittorrent

(We should consider building/hosting our own debian packages because the downstream(?) maintainer seems inactive)

Re: qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Sun Oct 06, 2013 8:44 pm
by ghostcow
OK guys thanks for the advice.

First of all shiki, I compiled the packages (libboost & qbittorrent) exactly like you said, configure, make and then 'sudo make install'. All my source files are owned by me, and I have execute permissions on the binary.

Second of all, I tried "APT-Pinning" so to speak, and by that I mean that I tried installing the 'experimental' .deb package, manually installing dependencies as I went along. The problem was that Debian won't let me upgrade libc6, so that's a bust just so you know.

I'll try compiling from Debian's source and using pbuilder, will update when i'm done.

EDIT: Removing the old qbittorrent and running 'sudo make install' again did the trick. Everything works fine now. The only caveat is that the install isn't managed by APT.
This wasn't a waste though, thanks for teaching me about pbuilder, I'll use it later!

Re: qbittorrent v3.0.11 won't run without 'sudo' after compilation

Posted: Mon Oct 07, 2013 9:38 pm
by Peter
You can build packages by hand, as in make .deb packages. Basically you perform the steps what pbuilder does.
But pbuilder will let you save the hassle, as you don't need to have all those damned source / dev packages installed.

Give it a try when you will have trouble with the current setup.
"If it works, don't touch it."

:)