简体   繁体   English

尽管我按照文档安装了它,但运行 kubectl 版本时出现错误

[英]I am getting an error while running kubectl version although I installed it by following the documention

kubectl version /home/lenovo/.local/bin/kubectl: line 1: syntax error near unexpected token <' /home/lenovo/.local/bin/kubectl: line 1: NoSuchKey The specified key does not exist.No such object: kubernetes-release/release//bin/linux/amd64/kubectl' kubectl version /home/lenovo/.local/bin/kubectl: line 1: syntax error near unexpected token <' /home/lenovo/.local/bin/kubectl: line 1: NoSuchKey指定的键不存在。没有这样的对象: kubernetes-release/release//bin/linux/amd64/kubectl'

I cleared kubectl from /usr/local/bin我从 /usr/local/bin 清除了 kubectl

and also from /home/$USER/.local/bin也来自 /home/$USER/.local/bin

And run the commands below:并运行以下命令:

curl -LO "https://dl.k8s.io/release/v1.24.7/bin/linux/amd64/kubectl"

curl -LO "https://dl.k8s.io/v1.24.7/bin/linux/amd64/kubectl.sha256"

echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

sudo install -o root -g root -m 0755 kubectl /home/$USER/.local/bin/kubectl

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在正在VM Ware上运行的ubuntu 12.04上安装netbeans 6.9.1时,我收到此错误 - while installing netbeans 6.9.1 on ubuntu 12.04 which is running on VM ware i am getting this error 安装最新版npm时为什么会报错? - Why am I getting an error when installing the latest version of npm? 我在 Vim 上编写 C++ 时收到“处理 ~/vimrc 时检测到错误”的消息 - I am getting the the "Error detected while processing ~/vimrc" while writing c++ on Vim 为什么我收到错误消息“找不到满足 Cython 要求的版本” - Why am I getting error saying "Could not find a version that satisfies the requirement Cython" 我收到这个错误,如正文所示,在 ubuntu 中构建 apk 文件时,请帮我解决这个错误 - I am getting this error as shown in body, while building a apk file in ubuntu, please help me to solve this error 当我使用 $ bin/launcher run 启动 Presto 服务器时出现错误 - while i launching Presto server using $ bin/launcher run i am getting error 知道为什么我会收到此错误吗? - Any idea why i am getting this error? 为什么在尝试此OpenGL教程时出现“ r300 FP:编译器错误:”? - Why am I getting “r300 FP: Compiler Error:” while attempting this OpenGL tutorial? 我一直在尝试在 ubuntu 22.04 上安装 sqldeveloper,但是在使用 dpkg 时出现错误 - I have been trying to install sqldeveloper on ubuntu 22.04 but am getting error while using dpkg 为什么在运行bash脚本时出现意外的文件结尾错误? - Why am I getting an unexpected end of file error when running a bash script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM