解决Centos6.8下安装Go-Ethereum的一个小错误

安装Go-Ethereum(以太坊)时,遇到了如下一个错误:

[root@localhost go-ethereum]# make geth
build/env.sh go run build/ci.go install ./cmd/geth
>>> /usr/local/go/bin/go install -ldflags -X main.gitCommit=46d4721519f80074795a0631f5bab875433a1cc6 -v ./cmd/geth
github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
# github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
/tmp/go-build907237261/b223/_x002.o: In function `get_usb_string':
vendor/github.com/karalabe/hid/hidapi/libusb/hid.c:444: undefined reference to `libiconv_open'
vendor/github.com/karalabe/hid/hidapi/libusb/hid.c:456: undefined reference to `libiconv'
vendor/github.com/karalabe/hid/hidapi/libusb/hid.c:471: undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
util.go:45: exit status 2
exit status 1
make: *** [geth] Error 1

百度了网上的诸多的资料,均无解,最后在官方的一个Issue下找到了答案:https://github.com/ethereum/go-ethereum/issues/15533

摘录解决方法:

mv /usr/local/include/iconv.h /usr/local/include/iconv.h.back

猜你喜欢

转载自blog.csdn.net/apanious/article/details/81336100