我尝试使用终端( brew
)以及使用 .dmg
安装 Python包裹。
command: brew install python
and this path is python when install using dmg
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
但我收到下面列出的错误。
之后我尝试了
ansible
安装:brew install ansible
和
which ansible
最后一个 ansible 命令 ping for all 或 host :
这是特定于操作系统的问题还是其他问题?您的帮助将不胜感激。
最佳答案
如 brew
,然后检查您的 brew
版本...
如果您真的需要brew install
,检查更新。
有一个known issue #5021在 macOS 10.13.6 上。和 #5019修复它。
...但我建议使用 pip install
自 ansible
取决于 python
,我强烈建议使用常见的安装方式 python
应用:
pip3 install ansible
或者,从 repo :
git clone https://github.com/ansible/ansible.git
cd ansible
pip3 install -r requirements.txt
python3 setup.py install
brew
警告截图警告说:
ansible is already installed, it's just not linked
所以,你可能会try :
brew unlink ansible
sudo chown -R $USER:admin /usr/local/bin /usr/local/etc /usr/local/sbin /usr/local/share
brew link --overwrite ansible
如果它没有帮助:
brew doctor
关于python - ansible 无法使用 "brew install ansible"命令完美安装在 MacOS 中不起作用?错误 : -sh:/usr/local/bin/ansible: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61139436/