Amazon Linux AMI 2018.03-Google Cloud SDK安装

时间:2018-06-22 07:23:38

标签: google-cloud-sdk amazon-linux

Official doc for google cloud sdk

  • 使用Cloud SDK存储库信息更新YUM
  • 安装Cloud SDK

但是当我按照指示进行操作时,会发生错误Requires: python2 >= 2.7

$ sudo yum install google-cloud-sdk
Loaded plugins: priorities, update-motd, upgrade-helper
4 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package google-cloud-sdk.noarch 0:206.0.0-1.el7 will be installed
--> Processing Dependency: python2 >= 2.7 for package: google-cloud-sdk-206.0.0-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: google-cloud-sdk-206.0.0-1.el7.noarch (google-cloud-sdk)
           Requires: python2 >= 2.7
           Available: python26-2.6.9-2.89.amzn1.x86_64 (amzn-main)
               python2 = 2.6.9-2.89.amzn1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我知道我可以使用tar.gz安装SDK,但是如果我只想使用rpm,如何解决此问题。任何指针将不胜感激。

2 个答案:

答案 0 :(得分:1)

安装yum下载器:

# yum install yum-utils

下载RPM:

# yumdownloader google-cloud-sdk-231.0.0-1.el7.noarch

使用“ --nodeps”移动并安装RPM:

# mv 4c714e030c915-google-cloud-sdk-231.0.0-1.el7.noarch.rpm /usr/local/src/google-cloud-sdk-231.0.0-1.el7.noarch  
# rpm -ivh --nodeps /usr/local/src/google-cloud-sdk-231.0.0-1.el7.noa

答案 1 :(得分:0)

您遇到的错误是由于操作系统无法解决的对python的依赖,您需要进行更新。我会将您定向到Can't install gcloud on Amazon Linux : invalid syntax,因为这似乎与同一问题有关,该解决方案可能会对您有所帮助。