Hyperledger Fabric设置下载特定平台二进制文件权限错误OSX

时间:2017-08-01 19:53:28

标签: bash macos unix terminal hyperledger-fabric

我正在尝试按照the docs在OSX上安装和运行Hyperledger Fabric,但是在下载特定于平台的二进制文件时,通过执行下载脚本以检索的命令sudo curl -sSL <URL to binaries> | bash,我遇到权限错误平台二进制文件

  

cryptogen   configtxgen   和configtxlator

即使我使用sudo,我仍在接收

Erics-MacBook-Pro:fabric-samples EricMcEvoy$ sudo curl -sSL <URL to binaries I can't post in SO> | bash

Password:
    ===> Downloading platform binaries

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0


tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/docker-compose-e2e.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/install: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/install/get-docker-images.sh: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/base: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/base/docker-compose-base.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/base/peer-base.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/channel-artifacts: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/channel-artifacts/.gitkeep: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode/go: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode/go/marbles02: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode/go/marbles02/marbles_chaincode.go: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode/go/chaincode_example02: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/chaincode/go/chaincode_example02/chaincode_example02.go: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/end-to-end.rst: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/crypto-config.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/scripts: Cannot mkdir: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/scripts/script.sh: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/generateArtifacts.sh: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/configtx.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/network_setup.sh: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/docker-compose-e2e-template.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/download-dockerimages.sh: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/docker-compose-cli.yaml: Cannot open: No such file or directory
tar: release/darwin-amd64: Cannot mkdir: Permission denied
tar: release/darwin-amd64/bin: Cannot mkdir: No such file or directory

我尝试在系统偏好设置用户&amp;组,在我自己的.sh文件中自己运行脚本,但仍然拒绝权限。

无论如何都要禁用此功能? 反正有没有为整个脚本启用sudo?

非常感谢这个

1 个答案:

答案 0 :(得分:1)

当您克隆fabric-samples或者创建了go / src / github.com / hyperledger目录时,你似乎以root(sudo)的身份运行了git clone,你在其中克隆了fabric-samples(以root身份)。您可能需要重新开始并使用您的帐户创建所有这些内容。