google-cloud-sdk - 在 Ubuntu 上安装 Google Cloud SDK 时出错,如何解决?
问题描述
我正在尝试设置 Google Cloud SDK CLI 来管理一些计算资源,而我只是按照这部分的指南进行操作。我运行了这个命令,它成功安装了很多东西,但遇到了下面的问题。谁能提出解决方案或如何调试?
$ sudo apt-get update && sudo apt-get install google-cloud-sdk
[sudo] password for #######:
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Get:5 https://packages.cloud.google.com/apt cloud-sdk InRelease [6349 B]
Ign:6 http://packages.cloud.google.com/apt cloud-sdk-focal InRelease
Err:7 http://packages.cloud.google.com/apt cloud-sdk-focal Release
404 Not Found [IP: 216.58.204.238 80]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [255 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [7492 B]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [132 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [4732 B]
Reading package lists... Done
E: The repository 'http://packages.cloud.google.com/apt cloud-sdk-focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决方案
我在 Ubuntu 20 上遇到了同样的问题。解决方案是使用 snap 安装。
snap install google-cloud-sdk --classic
确保你有--classic
最后,否则你会得到这个错误:
错误:快照“google-cloud-sdk”的此修订版是使用经典限制发布的,因此可能会在快照通常受限的安全沙箱之外执行任意系统更改,这可能会使您的系统面临风险。如果您理解并想继续,请重复包括 --classic 在内的命令。
推荐阅读
- javascript - mark.js - 使准确性参数成为一个函数
- dns - 如何找到DNS流量的源头进程?
- reactjs - Redux:缺少分号;出现奇怪的语法错误
- reactjs - 有人帮助 React Native Video Compression 吗?
- reactjs - 如何使用react-app-rewired在react app中运行cypress?
- presto - presto 查询以通过正则表达式模式检索表
- typescript - 为什么在 TypeScript 中通过 const 传递属性类型 unassignalbe?
- python - selenium 隐藏 chromdriver 控制台窗口
- python - 使用 Python 将 PDF 文件拖放到 word 文档中
- javascript - SVG 动画不填充 Safari 中的容器