Can I install Unison for Ubuntu 18.04 LTS on Ubuntu 20.04 LTS?

Tags:

Answer: 1

5 hours ago

I have two machines running Ubuntu. One runs Ubuntu 18.04 LTS and the other one runs Ubuntu 20.04 LTS. I want to use unison to sync files between them. I've installed unison on both of them the conventional way. I.e.:

sudo apt install unison-all

When I check what version is installed, I get this on both machines:

unison version 2.48.4

When I try to sync between them, the sync fails and I get the message:

Fatal error during unmarshaling (input value:ill-formed message) possibly because client and serer have been compiled with different versions of OCaml compiler.

When I look at /usr/bin/unison-2.48.4 on both machines, I get:

3377264 Oct 31  2017 /usr/bin/unison-2.48.4 [18.04]
3866920 Feb 16 10:04 /usr/bin/unison-2.48.4 [20.04]

So while the version number is the same, they have different sizes and a different timestamps, and my guess is that the difference is what causing the error.

The problem is also posted here: https://www.mail-archive.com/[email protected]/msg5750379.html – but no solution yet.

The unison that is installed on the machine running Ubuntu 18.04 LTS syncs fine with unison 2.48.4 for MS Windows 10, so that is the one I want to use on Ubuntu 20.04 LTS as well.

Is there any way to install the version of unison available for Ubuntu 18.04 LTS on Unison 20.04 LTS?

If "yes", how?

Added by: Phyllis Conroy

Answer: 2

1 hours ago

I think a better solution is

  1. Purge the current installation
  2. Install the former Debian version on the Ubuntu 20.04 LTS server:
wget http://ftp.fr.debian.org/debian/pool/main/u/unison/unison_2.48.4-1+b1_amd64.deb
sudo dpkg -i unison_2.48.4-1+b1_amd64.deb
wget http://ftp.fr.debian.org/debian/pool/main/u/unison/unison-gtk_2.48.4-1+b1_amd64.deb
sudo dpkg -i unison-gtk_2.48.4-1+b1_amd64.deb

Then set them on hold aptitude hold unison unison-gtk. Follow https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1875475 to see when it will be fixed.

Added by: Lavern DuBuque

Answer: 3

16 hours ago

I've discovered the hard way what apparently is common knowledge: Unison is extremely picky about not only the version number of the tool itself, but also the OCaml compiler used to compile it. It looks like the team that put together the binaries for Ubuntu 20.04 LTS recompiled with a newer version of the OCaml compiler than what was previously used, without thinking about backwards and cross-platform compatibility is the main feature of syncing tool. IMHO, that's a major goof-up.

The way I fixed this was to first purge unison on Ubuntu 20.04 LTS via apt and then reinstalling it "by hand" by using the static file unison-2.48.4-linux-i386-text-static.tar.gzthat can be downloaded from: https://www.urs-mueller.ch/de/computer/index.html.

I am not an Ubuntu wizard, so I don't know if that is the correct way to go about this, but it works for me and allows me to sync between all my computers again.

Added by: Ernestina Eichmann

Answer: 4

2 hours ago

Another solution, better in the long run IMHO, especially if you are synchronizing only linux machines, would be to install the snap version of Unison.

This version of Unison is system independent and whatever version of Ubuntu, Debian, etc. you install it on, it is always compiled against the same OCaml. So you don't have to worry about these issues every time something changes in Unison or OCaml. Currently, Unison is at 2.51.2 and OCaml 4.02.3

See this:

https://unix.stackexchange.com/questions/583058/unison-and-version-compiler-conflicts/583377#583377

Remember that you must install snapd first if you are not using Ubuntu:

sudo apt update
sudo apt install snapd

Log out and back in again, or restart your system, to ensure snap’s paths are updated correctly before proceeding.

Then, follow the steps showed in either the link above or this one:

http://www.xente.mundo-r.com/zasjls/other/20/unison_en.html

Added by: Morris Heidenreich

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9