Installing Dependencies for Hue

Loading Filters ... 6.0.0 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0 6.0.0 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0

This page is only required when upgrading to CDH 6 or higher and one of the following is true:

  • Hue is installed on a RHEL 6 or compatible host.
  • Hue is using PostgresSQL.

(RHEL 6 Compatible Only) Install Python 2.7

Hue in CDH 6 requires Python 2.7, which is included by default in RHEL 7 compatible operating systems (OSes).

RHEL 6 compatible OSes include Python 2.6. You must install Python 2.7 on all hosts running Hue before installing/upgrading Cloudera Manager and CDH:

RHEL 6
  1. Make sure that you have access to the Software Collections Library. For more information, see the Red Hat knowledge base article, How to use Red Hat Software Collections (RHSCL) or Red Hat Developer Toolset (DTS)?.
  2. Install and enable Python 2.7:
    sudo yum install python27
    source /opt/rh/python27/enable
CentOS 6
  1. Enable the Software Collections Library:
    sudo yum install centos-release-scl
  2. Install the Software Collections utilities:
    sudo yum install scl-utils
  3. Install and enable Python 2.7:
    sudo yum install python27
    source /opt/rh/python27/enable
Oracle Linux 6
  1. Download the Software Collections Library repository:
    sudo wget -O /etc/yum.repos.d/public-yum-ol6.repo http://yum.oracle.com/public-yum-ol6.repo
  2. Edit /etc/yum.repos.d/public-yum-ol6.repo and make sure that enabled is set to 1, as follows:
    [ol6_software_collections]
    name=Software Collection Library release 3.0 packages for Oracle Linux 6 (x86_64)
    baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/SoftwareCollections/x86_64/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1

    For more information, see Installing the Software Collection Library Utility From the Oracle Linux Yum Server in the Oracle documentation.

  3. Install the Software Collections utilities:
    sudo yum install scl-utils
  4. Install and enable Python 2.7:
    sudo yum install python27
    source /opt/rh/python27/enable

Installing the psycopg2 Python Package

Hue in CDH 6 requires version 2.5.4 or higher of the psycopg2 Python package for connecting to a PostgreSQL database. The psycopg2 package is automatically installed as a dependency of Cloudera Manager Agent, but the version installed is often lower than 2.5.4.

If you are installing or upgrading to CDH 6 and using PostgreSQL for the Hue database, you must install psycopg2 2.5.4 or higher on all Hue hosts as follows. These examples install version 2.7.5 (2.6.2 for RHEL 6):

RHEL 7 Compatible
  1. Install the python-pip package:
    sudo yum install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
RHEL 6 Compatible
  1. Make sure that you have installed Python 2.7. You can verify this by running the following commands:
    source /opt/rh/python27/enable
    python --version
  2. Install the python-pip package:
    sudo yum install python-pip
  3. Install the postgresql-devel package:
    sudo yum install postgresql-devel
  4. Install the gcc* packages:
    sudo yum install gcc*
  5. Install psycopg2 2.6.2 using pip:
    sudo bash -c "source /opt/rh/python27/enable; pip install psycopg2==2.6.2 --ignore-installed"
Ubuntu / Debian
  1. Install the python-pip package:
    sudo apt-get install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
SLES 12
Install the python-psycopg2 package:
sudo zypper install python-psycopg2