Resolve installation error "Installation of pycrypto-2.6.1.tar.gz failed!" on Ubuntu

Problem

The installation of Site Controller 1.2 fails on some ubuntu flavours with belows error. It is caused by an error of the package python-setuptools

Error message
Installing pycrypto-2.6.1.tar.gz ...
Installation of pycrypto-2.6.1.tar.gz failed! Check install.log for details.

Solution

Purge the setuptools package from your host.

  1. Remove the package

    vagrant@sitecontroller:~/SiteController-install$ sudo apt-get purge -f python-setuptools
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      python-setuptools*
    0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.
    After this operation, 530 kB disk space will be freed.
    Do you want to continue? [Y/n]
    (Reading database ... 44238 files and directories currently installed.)
    Removing python-setuptools (20.7.0-1) ...
  2. Start the setup again, the installation will succeed now.

     

    vagrant@sitecontroller:~/SiteController-install$ sudo ./setup.sh
    Checking python version ...
    Checking mosquitto version ...
    OS type is Ubuntu
    ...
    Installing python libraries ...
    ...
    Checking python module pyftpdlib, version 1.4.0 ... not installed.
    Installing pycrypto-2.6.1.tar.gz ...