3

Official doc for google cloud sdk said

  • Update YUM with Cloud SDK repo information
  • Install the Cloud SDK

But when I followed instruction Error Requires: python2 >= 2.7 occurs.

$ 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

I know that I could install SDK with tar.gz But How can I solve this if I only want to use rpm. Any pointer would be appreciated.

ruseel
  • 1,578
  • 2
  • 21
  • 41

2 Answers2

2

Install yum downloader:

# yum install yum-utils

Download the RPM:

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

Move and install the RPM with "--nodeps":

# 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
AAber
  • 1,562
  • 10
  • 14
-1

The error you are getting is due to a dependency on python that your OS is not addressing, you would need to update. I would direct you to Can't install gcloud on Amazon Linux : invalid syntax as this seems to be regarding the same issue, and the solution may help you.

rsalinas
  • 1,507
  • 8
  • 9