1

我是 npm 和 hyperledger fabric-composer 的新手 问题:我的设置有什么问题?调查和解决此类错误的策略是什么?

我做了什么:

  1. 安装 Ubuntu Linux 14.04 LTS(64 位)
  2. 使用https://fabric-composer.github.io/tasks/prerequisites.html上提供的脚本安装先决条件

执行 npm install 原因(不知道这个信息是否足够):

[...]
File "/usr/local/lib/python2.7/dist-packages/docker/transport/ssladapter.py", line 22, in <module>
    urllib3.connection.match_hostname = match_hostname
AttributeError: 'module' object has no attribute 'connection'

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/home/mjh/.nvm/versions/node/v4.6.2/bin/node" "/home/mjh/.nvm/versions/node/v4.6.2/bin/npm" "install"
npm ERR! node v4.6.2
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! getting-started@1.0.0 install: `scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the getting-started@1.0.0 install script 'scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls getting-started
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mjh/sample-applications/packages/getting-started/npm-debug.log

有关详细的 npm-debug.log 文件,请参阅链接 https://gist.github.com/mjh-halder/9fe473b44f0a731c996bbc5754011013

4

3 回答 3

1

我之前在 trusty (14.04) 上看到过这个问题,并且与 docker compose 使用的一个过时的 urllib3 库有关。根据您安装的 pip 版本,您可以按如下方式更新 urllib 库

pip install --upgrade pip
pip install -U urllib3
于 2017-02-17T13:43:59.487 回答
0

这里的问题与安装脚本的最后一部分有关 - 这是安装docker-compose工具的部分。今天在一个干净的 Ubuntu 14.04 LTS 映像上进行测试,这就是原因。

我建议docker-compose按照 docker 网站上的说明进行安装。( https://docs.docker.com/compose/install/ )

实际上这是

curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o 
chmod +x /usr/local/bin/docker-compose

运行docker-compose --version以检查它是否安装正确

$ docker-compose --version

docker-compose version: 1.10.0

然后像以前一样运行其余的 Fabric Composer 脚本。

我们正在更新脚本 - 但这应该会让您继续前进。

于 2017-02-15T17:01:14.157 回答
0

你缺少权限,所以你需要做sudo npm-install ...

于 2017-02-08T15:43:53.060 回答