go-eth编译的时候遇到:

  1. make geth
  2. build/env.sh go run build/ci.go install ./cmd/geth
  3. >>> /usr/local/go/bin/go install -ldflags -X main.gitCommit=1db4ecdc0b9e828ff65777fb466fc7c1d04e0de9 -v ./cmd/geth
  4. github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
  5. # github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
  6. /tmp/go-build267146492/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/_obj/hid_enabled.cgo2.o: In function `get_usb_string':
  7. hid_enabled.cgo2.c:(.text+0x94d4): undefined reference to `libiconv_open'
  8. hid_enabled.cgo2.c:(.text+0x9523): undefined reference to `libiconv'
  9. hid_enabled.cgo2.c:(.text+0x954f): undefined reference to `libiconv_close'
  10. collect2: error: ld returned 1 exit status
  11. util.go:44: exit status 2
  12. exit status 1
  13. make: *** [geth] Error 1

只要这一步神操作就可以了:

  1. rm /usr/local/include/iconv.h #最好是适用mv哈。mv /usr/local/include/iconv.h /usr/local/include/iconv.h.back

分类: web

标签:   ethereum