3

DCOS提供如下安装命令安装cli工具:

mkdir -p dcos && cd dcos && 
curl -O https://downloads.dcos.io/dcos-cli/install.sh && 
bash ./install.sh . https://mydomain.co && 
source ./bin/env-setup

但是,当我在我的 Mac 上运行它时,它会失败并显示以下内容:

mkdir -p dcos && cd dcos &&
 | →   curl -O https://downloads.dcos.io/dcos-cli/install.sh &&
 | →   bash ./install.sh . https://mydomain.co &&
 | →   source ./bin/env-setup
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5163  100  5163    0     0   6460      0 --:--:-- --:--:-- --:--:--  6469
Installing DC/OS CLI from PyPI...

New python executable in /Users/petr/dcos/bin/python
Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/Users/petr/dcos/bin/dcos", line 7, in <module>
    from dcoscli.main import main
  File "/Users/petr/dcos/lib/python2.7/site-packages/dcoscli/main.py", line 7, in <module>
    from dcos import config, constants, emitting, errors, http, subcommand, util
  File "/Users/petr/dcos/lib/python2.7/site-packages/dcos/config.py", line 10, in <module>
    from dcos import constants, jsonitem, subcommand, util
  File "/Users/petr/dcos/lib/python2.7/site-packages/dcos/subcommand.py", line 12, in <module>
    from subprocess import PIPE
ImportError: cannot import name PIPE

当我在 Ubuntu 上运行相同的命令时,它工作得很好。知道根本原因是什么吗?

4

1 回答 1

1

我在 OS X 上安装 DC/OS CLI 时看到的大多数问题的根本原因都与未满足的先决条件有关。也就是说,在 DC/OS 1.8 中,我们为 CLI 引入了二进制文件(正是为了避免您所描述的情况)。

于 2016-09-20T10:37:15.373 回答