简体   繁体   English

为什么我不能`sudo apt-get update && sudo apt-get install google-cloud-sdk`?

[英]Why can't I `sudo apt-get update && sudo apt-get install google-cloud-sdk`?

I followed the instructions in this url, https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu and when I typed the command我按照这个 url 中的说明进行操作, https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu并且当我输入命令时

sudo apt-get update && sudo apt-get install google-cloud-sdk

I got this errors:我收到了这个错误:

E:Malformed line 5 in source list/etc/apt/sources.list.d/google-cloud-sdk.list(dist parse).
E: The list of sources could not be read.

I wrote the above command in virtualenv.我在 virtualenv 中写了上面的命令。 I cannot understand why this error happens.我不明白为什么会发生这个错误。 All other step is completed, so I cannot understand why this happens.所有其他步骤都已完成,所以我无法理解为什么会发生这种情况。 How should I fix this?我应该如何解决这个问题?

this helped me:这对我有帮助:

curl https://sdk.cloud.google.com | bash

after:之后:

exec -l $SHELL

and finally:最后:

gcloud init

it's an interactive installer from google, more info here这是谷歌的交互式安装程序,更多信息在这里

I followed the deb/ubuntu install instructions from here: https://cloud.google.com/sdk/docs/install#deb我按照这里的 deb/ubuntu 安装说明进行操作: https : //cloud.google.com/sdk/docs/install#deb

The commands basically boil down to the following:这些命令基本上归结为以下几点:

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

apt-get -y install apt-transport-https ca-certificates gnupg

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

apt-get update && sudo apt-get -y install google-cloud-sdk kubectl

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

相关问题 如何在 Google App Engine 中进行 apt-get install - How to do apt-get install inside Google App Engine 如何在GCP应用引擎的requirements.txt中安装python包(使用apt-get) - How to place the python packages to be install (using apt-get) in requirements.txt in GCP app engine 如何卸载google-cloud-sdk? - How can I uninstall google-cloud-sdk ? 为什么我无法使Google Cloud Debugger正常工作? - Why can't I get the Google Cloud Debugger to work? 为什么Google-cloud-sdk go-app-stager无法识别GOPATH? - Why is GOPATH not recognized by google-cloud-sdk go-app-stager? 使用 Google App Engine 的 Apt get 安装 package - Installing a package using Apt get for Google App Engine 在 python Flask 应用程序中找不到 google-cloud-sdk - Cannot find google-cloud-sdk in python flask application 只读文件系统:运行 google-cloud-sdk 项目时出现“/dev/null” - Read-only file system: '/dev/null' while running google-cloud-sdk project google-cloud-sdk 安装在 CentOS /usr/local/bin 中找不到正确的 Python 2.7 版本 - google-cloud-sdk installation not finding right Python 2.7 version in CentOS /usr/local/bin GO在哪里寻找google-cloud-sdk? GOPATH应该是什么? - Where does GO look for google-cloud-sdk ? What should GOPATH be?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM