我正在尝试在 RHEL7 和 Percona 57 上使用 ansible mysql_user 模块 但它失败了
the python mysqldb module is required
我已经安装了完整的 Percona 57 我还尝试安装 yum install MySQL-python。 (1.2.3) 但在 Python 中,当我尝试导入 MySQLdb 时,我得到
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
pip 安装 MySQL-python 因错误而失败 (1.2.5)
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-_9GWXZ/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-rmYnmt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_9GWXZ/MySQL-python
还有其他人遇到过这个问题吗?
最佳答案
所以最后我发现是 SELinux 阻塞了端口 ><
关于python - Ansible mysql_user 与 Percona 57 和 RHEL7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38746361/