一.安装依赖
yum install python python-dev python-setuptools python-pip \ libkrb5-dev libxml2-dev libxslt-dev libssl-dev \ libsasl2-dev libsqlite3-dev libldap2-dev \ libffi-dev nodejs npm cmake make gcc g++
二.拉取源码
wget https://github.com/cloudera/hue/archive/refs/tags/release-4.10.0.tar.gz
三.执行编译
make apps
四.编译成功
五.将整个目录重命名
mv hue-release-4.10.0 hue 将hue替换/opt/cloudera/parcels/CDH/lib下的hue目录 mkdir /opt/cloudera/parcels/CDH/lib/hue /opt/cloudera/parcels/CDH/lib/hue.bak mv hue /opt/cloudera/parcels/CDH/lib/ 重启cdh hue配置如下
六.编译问题汇总:
1.问题一
ERROR: Could not find a version that satisfies the requirement setuptools_scm>=1.11.1 (from versions: none) ERROR: No matching distribution found for setuptools_scm>=1.11.1
解决方案:下载setuptool 拷贝到下面的目录
Python2.7依赖路径:/usr/lib/python2.7/site-packages
问题二
running build_ext building 'pysqlite2._sqlite' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-x86_64-2.7/src/module.o In file included from src/module.c:24:0: src/connection.h:33:21: fatal error: sqlite3.h: No such file or directory #include "sqlite3.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1
解决方案
yum install sqlite2-devel
问题三:
sasl/saslwrapper.cpp:21:23: fatal error: sasl/sasl.h: No such file or directory
解决方案:
pip install sasl
yum install gcc gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64 gcc-c++.x86_64
问题四:
In file included from Modules/LDAPObject.c:9:0: Modules/errors.h:8:18: fatal error: lber.h: No such file or directory #include "lber.h"
解决方案
yum install python-devel openldap-devel
问题五:
In file included from src/lxml/lxml.etree.c:346:0: /data/hue/hue-release-4.10.0/desktop/core/ext-py/lxml-3.3.6/src/lxml/includes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory #include "libxml/xmlversion.h
解决方案
yum install libxslt-devel