gpt4 book ai didi

docker - 有旧版本的谷歌云平台工具 : Docker

转载 作者:行者123 更新时间:2023-12-04 22:54:53 29 4
gpt4 key购买 nike

更新 gcloud 后,我收到此警告,但我该怎么做(我应该删除 Docker)?

WARNING:   There are older versions of Google Cloud Platform tools on your system PATH.
Please remove the following to avoid accidentally invoking these old tools:

/Applications/Docker.app/Contents/Resources/bin/kubectl

我的 .zshrc 中有这个:
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/<NAME>/google-cloud-sdk/path.zsh.inc' ]; then source '/Users/<NAME>/google-cloud-sdk/path.zsh.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/Users/<NAME>/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/<NAME>/google-cloud-sdk/completion.zsh.inc'; fi

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

最佳答案

这是因为 docker-for-mac 为 kubectl 安装了一个 bin,而 gcloud-sdk 还安装了另一个带有 gcloud components install kubectl 的 bin .

我的建议是从 gcloud 卸载 kubectl 作为组件,从 docker-for-mac 覆盖符号链接(symbolic link),并且只使用 homebrew 安装的 bin。

试试这个命令:
gcloud components remove kubectlbrew install kubernetes-clibrew link --overwrite kubernetes-cli

关于docker - 有旧版本的谷歌云平台工具 : Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53597361/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com