1

I'm trying to build Hyperledger Fabric images with Docker on Mac. I installed prerequisites and git cloned fabric 1.4 and fabric-ca 1.4. and I typed make docker inside of fabric directory. When I did same on unbuntu virtual box, it had no problem. However, I got error on Mac.(Mac Mojave 10.14.3)

Error log:

Building docker peer-image

docker build -t hyperledger/fabric-peer .build/image/peer

Sending build context to Docker daemon 33.35MB

Step 1/7 : FROM hyperledger/fabric-baseos:amd64-0.4.14 ---> 75f5fb1a0e0c

Step 2/7 : ENV FABRIC_CFG_PATH /etc/hyperledger/fabric ---> Using cache ---> 07fffab66f6c

Step 3/7 : RUN mkdir -p /var/hyperledger/production $FABRIC_CFG_PATH ---> Using cache ---> 12db028c5850

Step 4/7 : COPY payload/peer /usr/local/bin

---> Using cache

---> 1182063498b1

Step 5/7 : ADD payload/sampleconfig.tar.bz2 $FABRIC_CFG_PATH

failed to copy files: Error processing tar file(bzip2 data invalid: bad

magic value in continuation file):

make: *** [.build/image/peer/.dummy-amd64-1.4.1-snapshot-348c677c1]

Error 1

I searched every web sites, but I cannot solve it. Is there anyone know about this error ? I already tried: brew install gnu-tar --with-default-names and brew install lib tool.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Sehun Park
  • 113
  • 1
  • 2
  • 11
  • Possible duplicate of [Error building peer: "bzip2 data invalid" in goshim.tar.bz2](https://stackoverflow.com/questions/41465720/error-building-peer-bzip2-data-invalid-in-goshim-tar-bz2) – Mostafa Hussein Mar 04 '19 at 09:15
  • @MostafaHussein Thank you for comment. Actually I tried it, but it doesn't help. – Sehun Park Mar 04 '19 at 14:23
  • 1
    I solved it by typing ->export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" – Sehun Park Mar 05 '19 at 11:16

1 Answers1

1
brew install gnu-tar
brew install libtool
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
Daksh Shah
  • 2,997
  • 6
  • 37
  • 71