简体   繁体   English

使用 Docker for Mac 安装 Hyperledger Fabric 依赖的二进制文件

[英]Installing Hyperledger fabric dependent binaries using Docker for Mac

I downloaded Docker for Mac since it was a prerequisite for Hyperledger Fabric (also listed here ).我下载了 Mac 版 Docker,因为它是 Hyperledger Fabric(也在此处列出)的先决条件。 Now, I downloaded platform specific binaries listed here .现在,我下载了此处列出的特定于平台的二进制文件。

The instructions said:指令说:

If you are using Docker for Mac, you will need to use a location under /Users, /Volumes, /private, or /tmp.如果您使用 Docker for Mac,则需要使用 /Users、/Volumes、/private 或 /tmp 下的位置。 To use a different location, please consult the Docker documentation for file sharing.要使用其他位置,请参阅 Docker 文档以了解文件共享。

So,I used the following directory: /Users/user_name/Documents/Hyperledger\\ Fabric/所以,我使用了以下目录: /Users/user_name/Documents/Hyperledger\\ Fabric/

I followed the same commands as listed on the site.我遵循了网站上列出的相同命令。
However, I was not able to add the line below to the ~/.bash_profile.但是,我无法将下面的行添加到 ~/.bash_profile。

export PATH=/Users/user_name/Documents/Hyperledger\ Fabric/bin:$PATH  

If I added the above line and ran the bash_profile, it gave an error and after that commands like ls, open were giving error not found.如果我添加了上面的行并运行 bash_profile,它会给出一个错误,然后像 ls、open 这样的命令给出了未找到的错误。

It seems that there is a problem with the file location since I installed Docker for Mac instead of Docker toolbox.似乎文件位置有问题,因为我安装的是 Docker for Mac 而不是 Docker 工具箱。

The problem is that your directory name contains a space.问题是您的目录名称包含空格。 One way to avoid this problem is to specify a directory name that has no spaces.避免此问题的一种方法是指定一个没有空格的目录名称。 This would be the ideal approach since once you introduce a space in the PATH variable it would need to be quoted where used subsequently.这将是理想的方法,因为一旦您在 PATH 变量中引入了一个空格,就需要在随后使用的地方引用它。

Alternately, you could set the path as:或者,您可以将路径设置为:

export PATH="/Users/user_name/Documents/Hyperledger Fabric/bin":$PATH

However, as noted this has drawbacks.然而,如上所述,这有缺点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM