使用 Docker for Mac 安装 Hyperledger fabric 相关的二进制文件
Installing Hyperledger fabric dependent binaries using Docker for Mac
我为 Mac 下载了 Docker,因为它是 Hyperledger Fabric(也列出 here)的先决条件。
现在,我下载了 here 列出的特定于平台的二进制文件。
说明说:
If you are using Docker for Mac, you will need
to use a location under /Users, /Volumes, /private, or /tmp. To use a
different location, please consult the Docker documentation for file
sharing.
所以,我使用了以下目录:/Users/user_name/Documents/Hyperledger\ Fabric/
我遵循了网站上列出的相同命令。
但是,我无法将下面的行添加到 ~/.bash_profile.
export PATH=/Users/user_name/Documents/Hyperledger\ Fabric/bin:$PATH
如果我添加了上面的行和 运行 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.
问题是您的目录名称包含 space。避免此问题的一种方法是指定一个没有 space 的目录名。这将是理想的方法,因为一旦您在 PATH 变量中引入 space ,就需要在随后使用的地方引用它。
或者,您可以将路径设置为:
export PATH="/Users/user_name/Documents/Hyperledger Fabric/bin":$PATH
但是,如前所述,这有缺点。
我为 Mac 下载了 Docker,因为它是 Hyperledger Fabric(也列出 here)的先决条件。 现在,我下载了 here 列出的特定于平台的二进制文件。
说明说:
If you are using Docker for Mac, you will need to use a location under /Users, /Volumes, /private, or /tmp. To use a different location, please consult the Docker documentation for file sharing.
所以,我使用了以下目录:/Users/user_name/Documents/Hyperledger\ Fabric/
我遵循了网站上列出的相同命令。
但是,我无法将下面的行添加到 ~/.bash_profile.
export PATH=/Users/user_name/Documents/Hyperledger\ Fabric/bin:$PATH
如果我添加了上面的行和 运行 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.
问题是您的目录名称包含 space。避免此问题的一种方法是指定一个没有 space 的目录名。这将是理想的方法,因为一旦您在 PATH 变量中引入 space ,就需要在随后使用的地方引用它。
或者,您可以将路径设置为:
export PATH="/Users/user_name/Documents/Hyperledger Fabric/bin":$PATH
但是,如前所述,这有缺点。