Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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. I cannot understand why this error happens. All other step is completed, so I cannot understand why this happens. How should I fix this?

like image 614
mikimiki Avatar asked Oct 19 '17 04:10

mikimiki


People also ask

What do I do if sudo apt update is not working?

This error can happen when fetching the latest repositories during " apt-get update " was interrupted, and a subsequent " apt-get update " is not able to resume the interrupted fetch. In this case, remove the content in /var/lib/apt/lists before retrying " apt-get update ".

Why apt-get install not working?

Check the /usr/bin/ directory after installing the APT package to make sure it was installed correctly. Run the find apt-get command again if the file is empty. If no result is displayed, the only option is to reinstall the operating system. This may solve the issue.


1 Answers

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

like image 110
Vadim Avatar answered Sep 19 '22 15:09

Vadim