Tribler on Linux - Dependency is not satisfiable: python-libtorrent


#1

I run Linux Mint 13 (as it was the latest LTS available at the time). I don’t plan on updating it quite yet–though the support is running out soon, I won’t have the time until next June, most likely (it’d take a good deal of work with the box I have), so I’m stuck with it for now. (This is to forestall any “just upgrade” comments; it’s really not an option at this point, and I’ll have to wait a few months for the time for it.)

When I went to install Tribler, the .deb file gave this error:
Error: Dependency is not satisfiable: python-libtorrent (>= 0.16.4)

I checked my packages for python-libtorrent, and sure enough, the latest version on Mint 13 Maya (which corresponds to Precise 12.04) is 0.15.10; I simply can’t update that package to the version required for the latest Tribler.

What I found somewhat confusing was that while the FAQ on “how do I install Tribler” says to see the downloads page for supported versions (in the Linux section, to be specific), the downloads page did not specify what version or versions of Ubuntu were supported (Windows is very clearly marked as for supported versions, the Mac one at least tells people what isn’t supported, but there’s nothing along those lines for Linux). I’m guessing by the fact that the python-libtorrent package is not a recent enough version that 12.04 is not supported, but would have liked to have it marked clearly.

I tried the PPA here but it only went to Tribler version 6.2.0 (which did weird things like mark every torrent I created as Xxx with no ability to change it, plus it lacked all the anonymity features).

I did see that the directions suggested forcing the install despite the dependency issues. Has anyone here done this and seen what results occur? I mean, will Tribler even work without the latest version of that package, or is it going to be crashing and doing weird things on me because I’m trying to run it without the proper packages? Just hoping for a little guidance/confirmation, previous experience, something, before I start trying things like forcing installs despite dependency issues.


#2

I would just build the missing dependencies for your linux version, you can add a deb-src source from debian testing in your sources.list and install apt-build

Then you can do:

sudo apt-build --reinstall --target-release testing install python-libtorrent

And that should take care of fetching and building whatever is needed.


#3

Here I have to sheepishly admit that I have never built anything before.

Let me make sure I understood your instructions correctly (before I attempt it):

  1. add a deb-src source from debian testing in my sources.list (I tried to search to figure out what link to add and just got lost in forums and messages and wikis–apparently wasn’t using the right search terms–do you know exactly where I should be looking for this? I’m comfortable with adding PPAs but usually end up copying their terminal instructions to do so)

  2. install apt-build (I found version 0.12.42 in my package manager so I assume that will work–also, can this step be done before the step 1 above?)

  3. run the sudo line to upgrade my python-libtorrent to the later version

  4. then I can install the latest version of Tribler (and everything will hopefully run fine)

Sound about right?


#4
  1. Add this line: deb-src http://ch.archive.ubuntu.com/ubuntu/ trusty main restricted to your /etc/apt/sources.list and run sudo apt-get update (Better to use Ubuntu than debian repos)
  2. The order doesn’t matter, any version of apt-build should be good as it’s only the tool to build the packages from source.
  3. yes
  4. yes :smile:

Pay attention to the packages installation/removal list when you run the commands, If you see that it wants to remove any important package, don’t do it.


#5

Now it’s asking me to confirm if I’m gonna add apt-build repository to the sources.list. ?

(I had package manager open, I figured I’d get apt-build installed and then go to editing the sources to add that other link in; this message popped up in the after-process of installing apt-build.)

It also gives me an option to choose the optimization level. This apt-build configuration is something I have no idea about, lol.


#6

Please continue to advise on this when you have the chance–I have had this window open for three days and there is no Cancel option. I have to choose whether to add it or not, and I would like to be able to restart this computer (as it’s had far too much running for far too long), which means I really need to know if I should be adding this repository or not, and if so, to choose the optimization level.

I’ve tried searching online to find info about it, but the most I can find is a post warning of a possible bug with apt-build on 64-bit (which I am running) when using the apt-build repository. Nothing I ran across talks about why one would or wouldn’t add this repo, or if so, how to optimize it, so I’m hoping you can give me some advice about it.


#7

yes, tell it to update sources.list and leave the rest to default values


#8

All right, so I followed the directions and got the apt-build finished (and I had to follow the directions on that blog to keep it from looking at the nonexistent i386 location).

I tried this line as directed in your earlier post:

sudo apt-build --reinstall --target-release testing install python-libtorrent

And this is what I got:

The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "packages" on an undefined value at /usr/bin/apt-build line 70.

Suggestions?


#9

Oops my bad, mixed up Debian and Ubuntu there, replace testing by trusty


#10

Lol, either way, it gives me the same sort of answer:

The value 'trusty' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "packages" on an undefined value at /usr/bin/apt-build line 70.

No idea what to do here.


#11

Meh, let me try with an Ubuntu system to make sure all steps are OK (I was writing from my head but I guess I’m missing something)


#12

Ok, I see what I missed:

When I said to add this to sources.list

I forgot to tell you to add this too:

deb http://ch.archive.ubuntu.com/ubuntu/ trusty main restricted

DON’T upgrade or install anything else while this line is on your sources.list or your beloved mint will become a broken mint-ubuntu hybrid!

Do an apt-get update, the apt-build install stuff and when python-libtorrent is installed, don’t forget to comment out both lines again.


#13

I did apt-get update and then the apt-build line (used up-arrow to get back to the command), and got this:

python-libtorrent will not be built because it doesn't have a source package.
Missing source package name for source_by_source().

Hmm, I’m quite positive that both lines were valid at the time (I commented them out after I got that error message to be sure I didn’t accidentally install anything else while they were active). Does that mean that somehow python-libtorrent isn’t in the trusty source repo? I’m confused, lol.


#14

I found this PPA from the Deluge guys which contains recent enough libtorrent packages, just add it and forget about the whole apt-build stuff (remember to remove the trusty repos)

Add this to your sources.list
deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu precise main

We are using precise here because Mint 13 is based on that Ubuntu release.


#15

OK, so I removed the trusty repos, added that line to the source list, ignored all the warnings of “this hasn’t been verified!” (because apparently it has an issue with the public key), and got the upgraded deluge and python-libtorrent, plus a few new packages.

And I have to laugh, because now it gives me THIS when I try to install (yet another package I don’t have! and this one wasn’t in my package manager at all):

Error: Dependency is not satisfiable: python-pil

So I did a search and found the package listed here.
Better yet, it linked to a PPA that had a precise version of it available.
I figured I’d be able to install it from that.

Unfortunately, this is the error I got when I tried to install it:

Unpacking python-pil (from .../python-pil_2.4.0-1chl1~precise1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/python-pil_2.4.0-1chl1~precise1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/python2.7/dist-packages/PIL/_imagingcms.so', which is also in package python-imaging 1.1.7-4ubuntu0.12.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/python-pil_2.4.0-1chl1~precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I got the same error a few min later when my system went “oh, you have an update!” and proceeded to offer python-imaging to me. Then it said python-imaging is broken. (Probably should’ve waited for you to confirm that that was a good idea, lol.) I poked around but if I tried “apt-get install -f” it just wanted to remove calibre and gourmet and a few other things which made me raise my eyebrows so I didn’t go ahead with that. It seems to have fixed itself after installing a few other libraries (and uninstalling/reinstalling it), though, so I’m back to what I had before: python-imaging v1.17 installed when python-pil appears to need v2.4 or something like that. (I wonder what would happen if I uninstalled python-imaging, re-enabled the PPA, then tried installing python-pil? Won’t try it but am curious if that would work.)

So now I’m stuck again, lol. (Thanks for being so patient!)


#16

That error means that python-pil contains files that overlap with the contents of python-imaging. I don’t know what packages depend on python-imaging on your system, but I would guess a handful of them and uninstalling it would remove them.

I see two options here:

  • Update to the next Mint.
  • Try to run Tribler directly from a git clone (Instructions on how to do so are in our README file here). Dependency versions will not be checked this way. But be aware that we had to push up the minimum libtorrent version due to bugs in the library and I don’t remember if that implied API changes too. So no guarantee this would work either…

#17

Yeah, this is the list it was going to remove (I didn’t think I really wanted to do that):

calibre gourmet hplip mint-meta-mate mintinstall printer-driver-postscript-hp python-imaging

Alas, it just throws up an error in the middle, after cloning it correctly and running the script in terminal:

ImportError: No module named requests

Also assuming I shouldn’t try the method instructed in the FAQ, installing Tribler despite dependency issues? We were working more on trying to resolve the dependencies, didn’t try that.

I guess I’ll have to wait till I get a chance to upgrade my Mint. (It’s a bit of a complicated situation, with the number of Windows programs I’ve had to run with Wine–and have custom-created shortcuts in a special bar in addition to my taskbar, an upgraded kernel to avoid a bug with Ivybridge mobo, several special PPas for specific programs, etc. And then there’s backups of data to run . . .) Will take too long at one time to do it except on a long holiday and the first I get with nothing else I have to do is next June. :frowning:

Thanks for trying to help. I guess should maybe put up some notice on the site somewhere that Ubuntu 12.04 is not supported? Just in case anyone else tries the same thing.


#18

Well, at least that one is easy to fix: sudo apt-get install python-requests :slight_smile:


#19

Lol, but then it gets to this:

  File "/home/destiny/tribler/Tribler/Core/Video/VideoUtility.py", line 10, in <module>
    from PIL import Image
ImportError: No module named PIL

I’m thinking that given that I can’t seem to install python-pil, that I probably won’t have any luck with this then.

(On a side note, apparently it actually did uninstall those packages I listed, even though I don’t believe I gave it permission–must have misunderstood–so I had to reinstall them.)


#20

If you removed all the PPA’s you added, you should be able to install upstream’s python-pil with no issues. If you can’t then I guess it’s packaging bug.

Maybe you can work arond it by installing it via pip? pip install --user --upgrade pillow

Note: No sudo here.