User avatar
micksulley
Posts: 190
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

How to install specific version of Unison

Sun Aug 21, 2016 10:43 am

I use unison to sync files between various machines including a few Pi's. Having upgraded my other machines they are now running unison Version: 2.48.3 and will not sync with the Pi's which are running unison Version: 2.40.65-2

I have run dist-upgrade on the Pi's, so this is the latest version available as standard, is there a way to install Version: 2.48.3 on the Pi's?

Thanks
Mick

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How to install specific version of Unison

Sun Aug 21, 2016 11:24 am

micksulley wrote:I use unison to sync files between various machines including a few Pi's. Having upgraded my other machines they are now running unison Version: 2.48.3 and will not sync with the Pi's which are running unison Version: 2.40.65-2

I have run dist-upgrade on the Pi's, so this is the latest version available as standard, is there a way to install Version: 2.48.3 on the Pi's?

Thanks
Mick
Debian Jessie the basis of Raspbian Jessie has 2.40:

https://packages.debian.org/jessie/unison

Debian Testing Stretch is version 2.48:

https://packages.debian.org/stretch/unison


After backing up your Jessie install you could try the following:

edit /etc/apt/sources.list file and change 'jessie' to 'stretch', then

Code: Select all

sudo apt-get update
and

Code: Select all

sudo apt-get install update
Then afterwards edit the sources file again to its previous state, it may work or cause dependency hell...
Take what I advise as advice not the utopian holy grail, and it is gratis !!

User avatar
rpdom
Posts: 20212
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to install specific version of Unison

Sun Aug 21, 2016 11:49 am

Actually, looking at the dependencies of unison in Stretch, you could probably just pull down the .deb file and manually install it with dpkg. The only dependency is on libc6 >= 2.7 and Jessie is using libc6 2.19

Code: Select all

pi@raspi3 ~ $ cd /tmp
pi@raspi3 /tmp $ wget http://mirrordirector.raspbian.org/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
--2016-08-21 12:46:37--  http://mirrordirector.raspbian.org/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
Resolving mirrordirector.raspbian.org (mirrordirector.raspbian.org)... 5.153.225.207, 2001:41c9:1:3ce::11
Connecting to mirrordirector.raspbian.org (mirrordirector.raspbian.org)|5.153.225.207|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://raspbian.mirror.uk.sargasso.net/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb [following]
--2016-08-21 12:46:37--  http://raspbian.mirror.uk.sargasso.net/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
Resolving raspbian.mirror.uk.sargasso.net (raspbian.mirror.uk.sargasso.net)... 78.158.65.72, 2a01:550:0:402::2:3
Connecting to raspbian.mirror.uk.sargasso.net (raspbian.mirror.uk.sargasso.net)|78.158.65.72|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 681364 (665K) [application/x-debian-package]
Saving to: ‘unison_2.48.3-1_armhf.deb’

unison_2.48.3-1_armhf.de 100%[====================================>] 665.39K  --.-KB/s   in 0.1s   

2016-08-21 12:46:37 (5.10 MB/s) - ‘unison_2.48.3-1_armhf.deb’ saved [681364/681364]

pi@raspi3 /tmp $ sudo dpkg -i unison_2.48.3-1_armhf.deb 
Selecting previously unselected package unison.
(Reading database ... 39624 files and directories currently installed.)
Preparing to unpack unison_2.48.3-1_armhf.deb ...
Unpacking unison (2.48.3-1) ...
Setting up unison (2.48.3-1) ...
update-alternatives: using /usr/bin/unison-latest-stable to provide /usr/bin/unison (unison) in auto mode
Processing triggers for man-db (2.7.0.2-5) ...
pi@raspi3 /tmp $ 
Yep, that install ok for me :-)

User avatar
micksulley
Posts: 190
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: How to install specific version of Unison

Sun Aug 21, 2016 12:38 pm

Thanks for the replies. I did a bit more research and came up with this which allows using testing for specific packages -

Edit (or create) your /etc/apt/preferences to contain:
--------------------------------------------------------------------------
Package: *
Pin: release o=Raspbian,a=stable
Pin-Priority: 500

Package: *
Pin: release o=Raspbian,a=testing
Pin-Priority: 300
--------------------------------------------------------------------------
This is important so you keep stable for all packages but the ones explicitly taken from testing.

Then, add a line
--------------------------------------------------------------------------
deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi
--------------------------------------------------------------------------
to /etc/apt/sources.list to get access to the Raspbian testing repository.

Do
sudo apt-get update
to read the package metadata, then check
sudo apt-cache policy
to confirm that the testing repo is there with priority 300. Then
sudo apt-get install -t testing unison

uduse
Posts: 1
Joined: Mon Dec 04, 2017 3:07 pm

Re: How to install specific version of Unison

Mon Dec 04, 2017 3:09 pm

rpdom wrote:
Sun Aug 21, 2016 11:49 am
Actually, looking at the dependencies of unison in Stretch, you could probably just pull down the .deb file and manually install it with dpkg. The only dependency is on libc6 >= 2.7 and Jessie is using libc6 2.19

Code: Select all

pi@raspi3 ~ $ cd /tmp
pi@raspi3 /tmp $ wget http://mirrordirector.raspbian.org/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
--2016-08-21 12:46:37--  http://mirrordirector.raspbian.org/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
Resolving mirrordirector.raspbian.org (mirrordirector.raspbian.org)... 5.153.225.207, 2001:41c9:1:3ce::11
Connecting to mirrordirector.raspbian.org (mirrordirector.raspbian.org)|5.153.225.207|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://raspbian.mirror.uk.sargasso.net/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb [following]
--2016-08-21 12:46:37--  http://raspbian.mirror.uk.sargasso.net/raspbian/pool/main/u/unison/unison_2.48.3-1_armhf.deb
Resolving raspbian.mirror.uk.sargasso.net (raspbian.mirror.uk.sargasso.net)... 78.158.65.72, 2a01:550:0:402::2:3
Connecting to raspbian.mirror.uk.sargasso.net (raspbian.mirror.uk.sargasso.net)|78.158.65.72|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 681364 (665K) [application/x-debian-package]
Saving to: ‘unison_2.48.3-1_armhf.deb’

unison_2.48.3-1_armhf.de 100%[====================================>] 665.39K  --.-KB/s   in 0.1s   

2016-08-21 12:46:37 (5.10 MB/s) - ‘unison_2.48.3-1_armhf.deb’ saved [681364/681364]

pi@raspi3 /tmp $ sudo dpkg -i unison_2.48.3-1_armhf.deb 
Selecting previously unselected package unison.
(Reading database ... 39624 files and directories currently installed.)
Preparing to unpack unison_2.48.3-1_armhf.deb ...
Unpacking unison (2.48.3-1) ...
Setting up unison (2.48.3-1) ...
update-alternatives: using /usr/bin/unison-latest-stable to provide /usr/bin/unison (unison) in auto mode
Processing triggers for man-db (2.7.0.2-5) ...
pi@raspi3 /tmp $ 
Yep, that install ok for me :-)
works well for me too, thank you!

Return to “Troubleshooting”