我正在使用ansible shell命令访问kubernetes。我看到ansible有几个比shell命令更有用的k8s模块。
但它有一些先决条件
openshift >= 0.6 PyYAML >= 3.11
当我试图使用PyYAML安装时,似乎无法安装3.11
“百胜安装PyYAML”
,上面写着
Package PyYAML-3.10-11.el7.x86_64 already installed and latest version另外,当我试图使用yum安装openshift时,它显示了
0 packages excluded due to repository protections
No package openshift available.
Error: Nothing to do我的linux版本如下所示。
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core如何安装PyYAML和openshift,这是k8s不可用模块的先决条件?
发布于 2019-12-16 17:10:38
在centos 7的基本存储库中,模块PyYAML的最后一个版本是3.10-11,您可以使用"pip“实用程序安装最后一个版本。
首先,您必须安装pip实用程序(如果没有安装):
yum install python-pip在此之后,可以使用以下命令安装PyYAML的最后一个版本:
pip install --upgrade PyYAML您还可以使用pip实用程序安装openshift:
pip install openshifthttps://unix.stackexchange.com/questions/557209
复制相似问题