linux - 在 hadoop 集群上设置 Airflow 时遇到 GCC 安装问题

标签 linux hadoop airflow

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

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

我想在这个 hadoop 集群设置上安装和配置 Airflow,并使用 mysql 作为后端数据库。我想询问有关将 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'是用户名

我正在寻求一些帮助来解决上述问题以及有关上述配置的 Airflow 的建议。

最佳答案

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

您可以使用此命令安装它,

sudo yum install gcc gcc-c++ -y

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

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

关于linux - 在 hadoop 集群上设置 Airflow 时遇到 GCC 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60926009/

相关文章:

java - 如何将计算卸载到 virtualbox 中的 openstack(通过 devstack)安装?

asp.net - Linux 或 OS X 中的 Web API 2.1

python - 如何让一项任务失败n次才成功?

linux - Node JS - 监听系统事件

linux - 使用Eclipse IDE和Linux Redhat的C语言中的Unicode,ttf、utf和字符集之间的关系

scala - 在 Spark 中处理超过 3GB 的记录大小

hadoop - 实现定制的原始比较器

shell - Oozie shell 操作

airflow - 安装 Airflow 时出错 : By default one of Airflow's dependencies installs a GPL

docker - 如何在 Airflow 上运行 DockerOperator?