Question

Install Unison In CentOS 7

Posted October 23, 2014 17.9k views

Hello I has CentOS 6 and unison installed and worked great and now I am using CentOS 7 and unison does not even exist. I don’t want to install EPEL for CentOS 6 when EPEL exist for CentOS 7. The sad part is EPEL 7 does not have unison.

Thanks

2 comments
  • I tried

    rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
    yum update
    yum install unison
    

    And the package don’t exist.

    As you can see from the repo the Unison don’t exist:
    http://dl.fedoraproject.org/pub/epel/7/x86_64/u/

    However it exist for older 6 EPEL
    http://dl.fedoraproject.org/pub/epel/6/x86_64/

    And I want to avoid using old EPEL if possible.
    I am open to compile from source but having doing that as well.

    unison-2.40.102]# make
    /bin/sh: ocamlc: command not found
    /bin/sh: ocamlc: command not found
    ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
    make: ocamlc: Command not found
    UISTYLE = text
    Building for Unix
    NATIVE = true
    THREADS = false
    STATIC = false
    OSTYPE =
    OSARCH =
    make tags
    /bin/sh: ocamlc: command not found
    /bin/sh: ocamlc: command not found
    make[1]: Entering directory `/root/unison-2.40.102'
    ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
    make[1]: ocamlc: Command not found
    if [ -f `which etags` ]; then \
        etags *.mli */*.mli *.ml */*.ml */*.m *.c */*.c *.txt \
              ; fi 
    which: no etags in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/www/.local/bin:/home/www/bin)
    /bin/sh: line 1: etags: command not found
    make[1]: [tags] Error 127 (ignored)
    make[1]: Leaving directory `/root/unison-2.40.102'
    
  • Unfortunately, it doesn’t look like it’s packaged anywhere for CentOS 7 yet. To build it from source, you’ll need to install the ocaml package.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Got it. It works this way.

How to install Unison in CentOS 7

yum install ocaml ocaml-camlp4-devel ctags ctags-etags

cd ~
wget http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.40.102.tar.gz
tar xvfz unison-2.40.102.tar.gz
cd unison-2.40.102
make

sudo cp -v unison /usr/local/sbin/

cd ~
rm -fr unison*

One more thing.
You also have to place the “unison” binary in the “/usr/bin” folder else you will get this error from the other end server where you installed unison.

Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server

so do the following

sudo cp -v unison /usr/local/sbin/
sudo cp -v unison /usr/bin
Submit an Answer