在hadoop集群上设置气流时面临GCC安装问题

时间:2020-03-30 07:40:37

标签: linux hadoop airflow

我为开发环境设置了三个节点的Hadoop集群,其中一个充当主节点 节点和其他作为数据节点。 群集已使用以下配置/版本进行设置:

Operating System: Red Hat Enterprise Linux Server 7.7
python 3.7.3
anaconda 2
spark 2.45

我想在此hadoop集群设置中使用mysql作为后端数据库安装和配置airflow。我想询问有关将MySQL配置为后端数据库的其他问题,但是在主节点上运行pip时收到错误。

    pip install apache-airflow

错误消息:

      Running setup.py install for setproctitle ... error
        ERROR: Complete output from command /root/anaconda2/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-TUrT4x/setproctitle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-GdyZzq/install-record.txt --single-version-externally-managed --compile:
        ERROR: running install
        running build
        running build_ext
        building 'setproctitle' extension
        creating build
        creating build/temp.linux-x86_64-2.7
        creating build/temp.linux-x86_64-2.7/src
        gcc -pthread -B /root/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SYS_PRCTL_H=1 -DSPT_VERSION=1.1.10 -I/root/anaconda2/include/python2.7 -c src/setproctitle.c -o build/temp.linux-x86_64-2.7/src/setproctitle.o
        unable to execute 'gcc': No such file or directory
        error: command 'gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command "/root/anaconda2/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-TUrT4x/setproctitle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-GdyZzq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-TUrT4x/setproctitle/

当我键入which gcc时,我得到了。

which gcc

    /usr/bin/which: no gcc in (/home/xyz/anaconda2/envs/python3.7.2/bin:/home/xyz/anaconda2/bin:/home/xyz/spark-2.4.5-bin-hadoop2.7/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:
    /usr/sbin:/home/xyz/jdk1.8.0_241/bin:/home/xyz/hadoop-2.7.7/bin:/home/xyz/.local/bin:/home/xyz/bin)

'xyz'是用户名

我正在寻找一些帮助来解决上述问题,并为上述配置提供有关气流的建议。

1 个答案:

答案 0 :(得分:2)

gcc是Apache Airflow的先决条件,看起来好像尚未安装。

您可以使用此命令进行安装

sudo yum install gcc gcc-c++ -y

您可能还需要这些开发包,

sudo yum install libffi-devel mariadb-devel cyrus-sasl-devel -y