5

I have two machines. One with unison v. 2.40 (Debian Jessie) and a new one (Debian Stretch) where I installed package unison-all, which brought in unison versions 2.32, 2.40 and 2.48. However, I was unable to make my 2.40 work against the new machine, since it only presented v. 2.48. No matter what I do, I get:

expected "Unison 2.40\n" but received "Unison 2.48\n\000\000\000\000\017",

I worked around the issue by removing unison-all and installing v. 2.40 explicitly, but I wonder what to do if I ever want to use two concurrent versions of unison on this machine.

  • I have the same issue, but can not fix it the way you mentioned. If I install the package unison-all on Stretch it only installs 2.48. See [lists.debian.org/debian-user/2017/12/msg00425.html] "Since stretch only has 2.40 (corrected the typo) in its repo, it can only pull that one in." I also tried to install unison 2.48 on Debian Jessie [forums.debian.net/viewtopic.php?f=10&t=134431], but this overwrites unison 2.40 which I still need for syncs with other servers. How did you manage to get unison 2.32, 2.40 and 2.48 on Debian Stretch? This is what I need! – lihume May 18 '18 at 5:35
  • I'm looking at my deployment but it looks as described above. I have package unison-all, it depends on unison, unison2.40.102 and unison2.32.52. apt-cache policy unison-all tells me that my version is 2.48+2 and that I'm using stretch/main amd64 Packages. I'm sorry but I cannot confirm that Stretch only has unison 2.48. I still see all three versions on offer. – Frigo May 22 '18 at 12:23
6

I just ran into this problem myself, and it took quite a bit of searching to find the answer! So here it is, and it works for me.

To use multiple versions of unison, install unison-all. Then...

Using multiple versions of Unison on the client

Choose a specific version to run by appending the version number, like so:

unison-2.40 ...

Or, if you want to run the latest version, you can simply type:

unison

Using multiple versions of Unison on the server

Instruct the client version of Unison to invoke the matching version of Unison on the server using the -addversionno tag, like so:

unison -addversionno

For futher details

and if you still get an

Fatal error: Received unexpected header from the server

see this solution.

| improve this answer | |
  • Hi! Thanks for dropping a note. However, I think your setup is the opposite of mine. I have multiple versions of unison on the remote machine and a single one on my local machine where I run the command. So locally I have nothing to chose from. I tried, of course, but the behavior is the same as before. – Frigo Nov 16 '15 at 10:43
  • Youre right, I have the opposite setup. In your case: I see that the unison man page lists an advanced option ` -addversionno` that adds the version number to name of unison on server. Sounds like that might be what you need? – mhwombat Nov 16 '15 at 20:32
  • Yes! This (-addversionno) is the solution I was looking for. Thanks! I really could not find that. Are you going to expand your answer with that so that I can upvote and accept it? – Frigo Nov 18 '15 at 9:58
  • Done! Glad that helped. – mhwombat Nov 18 '15 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.