[guide] upgrading transmission to 2.93

  • hello,
    many torrent sites are banning the transmission client 2.92 and below. This is a problem becuase 2.93 is relativly new and is not in any repository or omv extras.
    This is how i manged to get to 2.93. The guide was written for another site so might be a bit more generic, but hopefully, if you're a begginer to linux like me, you'll be able to follow it.




    Are you trying to upgrade to Transmission 2.93 but,like me, are stuck in Linux hell of "simply compile from source" and then no instructions on how to do that?


    I'm not a linux expert, but i am really stubborn.
    So here's my guide.


    Prerequisites:


    You must have the ability to reach the CLI/Bash window of the computer you wish to upgrade.
    You should at least know what the sudo, cd and ls commands do. If not, you'll struggle to follow this.
    READ THE REPLIES TO THIS THREAD don't go blindly following the advice of some random on the internet. Wait for some other sucker to test my instructions and/or reply with how i could have done it better.


    My system:
    I'm using an ATOM intel pc running x64 bit architecture and kernel 4.4 of Debian.
    I'm running Openmediavault on top.



    I WILL NOT HELP YOU IF YOU BORK YOUR SYSTEM



    Now this guide is in two parts, the first part is getting the new version from a repository, which; if it works, is much easier. and the second very long and very hard part where you really really have to compile from source. Which is the equivalent of building a car from parts with the help of a robot that sort of knows what its doing.


    Part 1: trying a respository.


    ok, so since this whole thing started there may have been an update to the repository to get you out of trouble.
    My box is an x686 architecture device, and that is what the repository:


    https://launchpad.net/~transmissionbt/+archive/ubuntu/ppa


    says was updated on the 21 March 2018 (2.93-1ubuntu1~17.10.2)
    I could be reading this wrong but if your device ISN'T a computer (it's a raspberry pi, or a firestick, or a nas box) running x86 or 64 bit archetecture this might not work for you and you're stuck with part 2.


    anyway, lets add this repositry
    sudo add-apt-repository ppa:transmissionbt/ppa


    uh oh, did you get an error about command not found. don't worry do this to fix it
    sudo apt-get install -y software-properties-common


    ok, try that first command again.


    did it work? no? it gave you an error like this:
    gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
    gpg: connecting dirmngr at '/tmp/tmpyqcnq05k/S.dirmngr' failed: No such file or directory


    ok, you need this
    sudo apt-get install dirmngr


    right, did that work? of course not. you probably got this error


    Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fcdfd141510>
    Traceback (most recent call last):
    File "/usr/lib/python3.5/weakref.py", line 117, in remove
    TypeError: 'NoneType' object is not callable
    Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fcdfd141510>
    Traceback (most recent call last):
    File "/usr/lib/python3.5/weakref.py", line 117, in remove
    TypeError: 'NoneType' object is not callable


    so we're going to need to fix that too.


    lets go to where python lives
    cd /usr/lib/python3.5/


    and edit the file that's being annoying
    nano weakref.py


    find line 109 (you can use ctrl+_ and type in 109)


    change this


    def remove(wr, selfref=ref(self)):


    so it says this


    def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):


    and 117 change this


    _remove_dead_weakref(d, wr.key)


    with:


    _atomic_removal(d, wr.key)


    write it out (ctrl+o) and exit (ctrl+x)
    lets try that command again


    hmmm, that didn't work for me, just said i'ts already installed, but i don't trust it, so we'll remove it, and add back again
    sudo apt-get remove dirmngr


    and back in again
    sudo apt-get install dirmngr


    great, now lets update
    sudo apt-get update


    and try and install transmission
    sudo apt-get install transmission


    hopefully, it will then install 2.93-1 (or higher) and you're done!


    but wait, when i try it, it still says 2.92 so something isn't right


    restart, no change. ok, lets ask it where it thinks transmission is
    which transmission-cli


    mine says /usr/bin/transmission-cli


    and when i go (note the capital v there)
    /usr/bin/transmission-daemon -V


    it says 2.92. so how it that possible?
    perhaps i now have two versions of transmission, one installed in the 'correct' place running 2.93 and one in the 'wrong' place running 2.92
    so two approaches to fix this, change the path so that it looks for the correct one, or copy the new version over the top.
    i'm going for the latter.


    stop transmision
    sudo service transmission-daemon stop


    lets find all my transmission-daemons
    sudo find / -type f -name "transmission-daemon"


    that might take a while
    but i get


    /etc/init.d/transmission-daemon
    /etc/default/transmission-daemon
    find: ‘/proc/1387’: No such file or directory
    find: ‘/proc/1390/task/1390/net’: Invalid argument
    find: ‘/proc/1390/net’: Invalid argument
    /var/tmp/transmission-2.93/daemon/transmission-daemon
    /usr/local/bin/transmission-daemon
    /usr/bin/transmission-daemon


    now for those of you playing along, you probably got somethign different. The reason is i've already tried part two of this guide and have pretty much littered my system with failed attempts. the 'correct' install location is


    /usr/local/bin/


    and not /usr/bin


    so, with the new files in /usr/local/bin lets copy them accross
    sudo cp /usr/local/bin/transmission-show /usr/bin/transmission-show
    sudo cp /usr/local/bin/transmission-remote /usr/bin/transmission-remote
    sudo cp /usr/local/bin/transmission-edit /usr/bin/transmission-edit
    sudo cp /usr/local/bin/transmission-daemon /usr/bin/transmission-daemon
    sudo cp /usr/local/bin/transmission-create /usr/bin/transmission-create
    sudo cp /usr/local/bin/transmission-cli /usr/bin/transmission-cli


    now when i tried that last one (transmission-cli) i got an error (cp: cannot stat '/usr/local/bin/transmission-cli': No such file or directory) which means source file not found.
    we're going to ignore that.


    ok, so reboot
    reboot


    is everything working? ahHAHAHAHA no of course not.
    on my home client i'm getting "connection refused" and when i log back into the server and run
    sudo service transmission-daemon status


    i get


    ● transmission-daemon.service - Transmission BitTorrent Daemon
    Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
    Active: failed (Result: timeout) since Mon 2018-04-30 19:52:07 AEST; 5min ago
    Process: 555 ExecStart=/usr/bin/transmission-daemon -f --log-error (code=exited, status=0/SUCCESS)
    Main PID: 555 (code=exited, status=0/SUCCESS)


    Apr 30 19:50:36 mediafiler systemd[1]: Starting Transmission BitTorrent Daemon...
    Apr 30 19:50:40 mediafiler transmission-daemon[555]: sendto: Network is unreachable
    Apr 30 19:50:42 mediafiler transmission-daemon[555]: [2018-04-30 19:50:42.197] UDP Failed to set receive buffer: requested 4194304, got 425
    984 (tr-udp.c:84)
    Apr 30 19:50:42 mediafiler transmission-daemon[555]: [2018-04-30 19:50:42.198] UDP Failed to set send buffer: requested 1048576, got 425984
    (tr-udp.c:95)
    Apr 30 19:52:06 mediafiler systemd[1]: transmission-daemon.service: Start operation timed out. Terminating.
    Apr 30 19:52:07 mediafiler systemd[1]: Failed to start Transmission BitTorrent Daemon.
    Apr 30 19:52:07 mediafiler systemd[1]: transmission-daemon.service: Unit entered failed state.
    Apr 30 19:52:07 mediafiler systemd[1]: transmission-daemon.service: Failed with result 'timeout'.


    the important bit here isn't Network is unreachable, but that timeout error at the end
    this is a bug in the build instructions which carried through to the ppa repository (which was built using the build instructions) see this rather salty exchange here for more info
    https://github.com/transmission/transmission/issues/537


    but lets not worry too much about that, how do we fix it? like this:


    make a directory
    sudo mkdir /etc/systemd/system/transmission-daemon.service.d/


    make a file in that directory and open it for editing
    sudo nano /etc/systemd/system/transmission-daemon.service.d/override.conf


    write in that file


    [Service]
    Type=simple
    User=debian-transmission
    Group=debian-transmission


    write out and exit
    reboot
    reboot



    and we're done.


    unless you couldn't get the repository to work, in which case, you'll need to "simply compile from sauce" which my guide is in part 2 below.


    good luck.

  • Part 2


    Part 2: compiling from source:


    I tried following these instructions
    https://github.com/transmissio…iki/Building-Transmission
    which are massively out of date and will give you errors.
    and so, this is how i did it, and how i got round the errors.


    FIRST FIRST FIRST COPY DOWN YOUR SETTINGS FOR TRANSMISSION, YOU WILL NEED THEM LATER.


    first, connect to your box and bring up the console.
    I have logged in as root, but i've used the sudo command anyway so apart from being asked a password occasionally this should work whether you are logged in as root or not.
    If one of the commands says permission denied, try putting sudo in front of the command and try again.
    anything in a block quote should be entered in its entirety


    first up, let update apt
    sudo apt-get update


    if you get loads of errors check that your box can reach the internet.
    next up lets check the install of transmission
    sudo apt-get install transmission


    if you get this error:
    Reading package lists... Done
    Building dependency treeReading state information... Done
    transmission is already the newest version (2.92-2+deb9u1).
    0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.


    then carry on, if you don't then congratulations, someone has updated your repository since i wrote this and you can upgrade the easy way.


    so what we're going to do is download the source code for the latest version of transmission, then compile it (turn it from human readable text into a program that can be run on the computer)
    first though, all the things you need to compile transmisison are broken.
    and... some of the things that the things that compile transmission need are also broken.
    So let start at the bottom and do a bit of Yak shaving.
    sudo apt-get install ca-certificates libcurl4-openssl-dev libssl-dev pkg-config build-essential checkinstall


    off it will go, it should complain but not give you any proper "i can't do this because of reasons" errors


    now we're going to move to the tmp directory
    cd /var/tmp


    let's download libevent
    wget https://github.com/libevent/li…event-2.1.8-stable.tar.gz
    and now we can extract that file
    tar xzf libevent-2.1.8-stable.tar.gz
    and move into that folder
    cd libevent-2.1.8-stable/
    now we compile libevent
    CFLAGS="-Os -march=native" ./configure && make
    ok, this is where it started to go wrong for me, checkinstall is a program that does something, and maybe soemone can reply with what it does, but it doesn't seem to be required to get Trnasmssion upgraded so lets move on.


    So now we've got the things that the things that compile transmission need working (probably) lets get come out of this folder
    cd /var/tmp


    and go and get yet more stuff (if you're on ubuntu or another 'richer' install you may have all of these things, i didn't)
    sudo apt-get install libevent-dev
    sudo apt-get install zlib1g-dev
    sudo apt-get install intltool


    ugh, never ends.
    ok, lets see if that was enough.
    lets go get transmission.
    wget https://github.com/transmissio…/transmission-2.93.tar.xz


    oh look, it's an xz file that your computer can't work with. sigh.
    let get xz utils
    sudo apt-get install xz-utils


    and now we should be able to extract transmission
    tar xf transmission-2.93.tar.xz
    and move to that folder
    cd transmission-2.93/


    man, did i mention you should have got a beverage before all this?


    let see if we can compile it
    CFLAGS="-Os -march=native" ./configure && make && checkinstall


    did it take forever and give you a bucketton of warnings? good.


    it will then fall into checkinstall which is that program from before. It will give you a load of questions. When it asks about the package description type
    transmission293


    then press enter twice


    it will spend a lot time doing things, you're actually watching another program now called checkinstall. Yes that one that failed earlier.
    did it end ok? Yes? good, you can skip this bit (jump to welcome back), if it failed miserably do this bit:


    if your checkinstall ended with this


    /bin/mkdir: cannot create directory ‘/usr/local/share/transmission’: No such file or directoryMakefile:405: recipe for target 'install-dist_dataDATA' failedmake[3]:
    *** [install-dist_dataDATA] Error 1make[3]: Leaving directory '/var/tmp/transmission-2.93/web/images'Makefile:475: recipe for target 'install-am' failedmake[2]:
    *** [install-am] Error 2make[2]: Leaving directory '/var/tmp/transmission-2.93/web/images'Makefile:497: recipe for target 'install-recursive' failedmake[1]:
    *** [install-recursive] Error 1make[1]: Leaving directory '/var/tmp/transmission-2.93/web'Makefile:508: recipe for target 'install-recursive' failedmake:
    *** [install-recursive] Error 1
    **** Installation failed. Aborting package creation.
    Cleaning up...OK
    Bye.


    Then this sucks. so lets fix it.
    lets go where checkinstall config lives
    cd /etc/


    and open up the config file
    sudo nano checkinstallrc


    somewhere in this config file we need to make a change...


    find the bit that says
    # Are we going to use filesystem translation?
    TRANSLATE=1
    and change it to say
    # Are we going to use filesystem translation?
    TRANSLATE=0


    now write out (ctrl+o) and exit (ctrl+x)


    back to the folder
    cd /var/tmp/transmission-2.93/


    and lets try that again
    CFLAGS="-Os -march=native" ./configure && make && checkinstall


    and welcome back, you should have got


    **********************************************************************


    Done. The new package has been installed and saved to


    /var/tmp/transmission-2.93/transmission_2.93-1_amd64.deb


    You can remove it from your system anytime using:


    dpkg -r transmission


    **********************************************************************


    ok, that worked, you've proven you can get the new one installed. you're probably still running the old one, so lets stop that and remove it
    sudo service transmission-daemon stop


    and (after a few seconds)
    sudo apt-get remove transmission transmission-daemontransmission-common transmission-gtk transmission-cli transmission-qt


    you'll get a few grumbles but you should see 2.92 get uninstalled.
    now lets put the new in again


    sudo service transmission-daemon start
    oh dear, did you get


    Failed to start transmission-daemon.service: Unit transmission-daemon.service is masked.
    so to fix that we'll
    sudo systemctl unmask transmission-daemon.service


    and


    start it again.
    sudo service transmission-daemon start


    is it working? you can tell with
    sudo service transmission-daemon status


    (i see Active active (exited) which i think is good. Now if you're using the normal transmision (not just the deamon) you can fire it up and put your settings in THAT YOU COPIED DOWN IN THE FIRST STEP.


    woohoo you're done.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!