如何恢复 gsutil 命令?

How to restore gsutil command?

我已经将 Google Cloud SDK 从

更新到最新版本 135.0.0

更新后,我收到以下消息。

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:

/usr/bin/git-credential-gcloud.sh

/usr/bin/bq

/usr/bin/gcloud

/usr/bin/gsutil

所以我把上面的文件夹全部删除了

之后 gsutil 停止工作。

请帮我解决这个问题。

通过

安装的问题
sudo apt-get update && sudo apt-get install google-cloud-sdk

https://cloud.google.com/sdk/docs/#deb 你应该使用相同的机制来升级。

gcloud 也是一种包管理器,能够升级自身及其依赖的包。不幸的是,如果您使用 gcloud 本身进行升级,它会将其安装在不同的位置。它可能不起作用,因为需要将新位置添加到您的路径中。

您可以尝试通过 apt-get 重新安装 googcle-cloud-sdk 包。