在cygwin上安装gcutil时出错

时间:2013-12-12 10:00:31

标签: bash curl cygwin gcutil

https://developers.google.com/compute/docs/gcutil/处遵循gcutil教程,这是下载说明的一个步骤:

enter image description here

但是,当我尝试此网址时:“$ curl https://dl.google.com/dl/cloudsdk/release/insall_google_cloud_sdk.bash | bash”

我收到此错误:

"$ curl https://dl.google.com/dl/cloudsdk/release/insall_google_cloud_sdk.bash |
 bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   869  100   869    0     0    562      0  0:00:01  0:00:01 --:--:--   679
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<!DOCTYPE html>'"

我尝试使用http代替https,但收到此错误:

$ curl http://dl.google.com/dl/cloudsdk/release/insall_google_cloud_sdk.bash |
bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:03:50 --:--:--     0cu
rl: (7) couldn't connect to host

我有缺失的一步吗?

1 个答案:

答案 0 :(得分:0)

我认为你可能会添加一个额外的字符,还有一个换行符。命令是:

curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash

不需要$符号,这只是Cygwin bash shell的指示符。该字符串命令中根本不应有换行符(|之后没有换行符)。