【问题标题】:Installing gcloud / gsutil on Ubuntu 18在 Ubuntu 18 上安装 gcloud / gsutil
【发布时间】:2020-04-24 20:42:46
【问题描述】:

希望将一些存储桶从 AWS S3 迁移到 Google Cloud Storage,但在我的 Ubuntu 18.04.4 虚拟机上安装 GCP 工具时运气不佳。

按照本指南:[https://cloud.google.com/storage/docs/gsutil_install#deb][1]

主要是卡在这里:

root@ubuntu18:/home/me# apt install google-cloud-sdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done

No apt package "google-cloud-sdk", but there is a snap with that name.
Try "snap install google-cloud-sdk"

E: Unable to locate package google-cloud-sdk

【问题讨论】:

    标签: ubuntu google-cloud-platform ubuntu-18.04 apt


    【解决方案1】:

    您是否先添加了 Google Cloud SDK URI?

    # Add the Cloud SDK distribution URI as a package source
    echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
    
    # Import the Google Cloud Platform public key
    curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
    
    # Update the package list
    sudo apt-get update
    
    # Install the Google Cloud SDK
    sudo apt-get install google-cloud-sdk
    

    【讨论】:

    • 是的,这就是问题所在。德普。
    • 也解决了我的问题,谢谢! @JohnHeyer,正如您所说,它解决了您遇到的问题,您可以接受答案吗?
    • 在 ubuntu 上运行良好!!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-05
    • 2013-12-25
    • 2019-06-18
    • 2020-08-30
    • 2021-04-20
    • 2020-08-06
    相关资源
    最近更新 更多