无法在Amazon Linux上安装gcloud:语法无效

编程入门 行业动态 更新时间:2024-10-25 10:26:32
本文介绍了无法在Amazon Linux上安装gcloud:语法无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图在运行以下命令的交互模式下在运行Amazon Linux 4.14.47-56.37 64位的EC2服务器上安装gcloud:

I'm trying to install gcloud on my EC2 server running Amazon Linux 4.14.47-56.37 64bits, in interactive mode running the following command :

curl sdk.cloud.google | bash

文件已正确下载,但安装失败,并显示以下回溯:

The files download correctly, but the install then fails with the following Traceback :

File "/home/ec2-user/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module> import bootstrapping File "/home/ec2-user/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module> import setup # pylint:disable=g-import-not-at-top File "/home/ec2-user/google-cloud-sdk/bin/bootstrapping/setup.py", line 55, in <module> from googlecloudsdk.core import properties File "/home/ec2-user/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 291 self.__sections = {section.name: section for section in sections} ^ SyntaxError: invalid syntax

您知道为什么这会引起问题吗?

Any idea why this for is causing issues?

我正在按照Google的建议运行python 2.7(2.7.14).

I am running python 2.7 (2.7.14) as recommended by Google.

推荐答案

除了在"python"命令上安装的python 2.7之外,我还在"python2"命令上安装了python 2.6. 卸载python 2.6解决了该问题,在下次尝试时Google Cloud安装顺利完成.

On top of python 2.7 installed on the "python" command, I also had python 2.6 installed on the "python2" command. Uninstalling python 2.6 solved the issue, Google Cloud install went through without issue on the next try.

更多推荐

无法在Amazon Linux上安装gcloud:语法无效

本文发布于:2023-10-27 16:08:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533876.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:语法   Amazon   Linux   gcloud

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!