2017-02-13 12:56
浏览 1.1k


I'm trying to compile the Ethereum Go client. Following the instructions I simply run make geth, but that fails:

$ make geth
build/ go run build/ci.go install ./cmd/geth
make: build/ No such file or directory
make: *** [geth] Error 1

As far as I understand from this error it complaints that either build/ or build/ci.go doesn't exist. So I checked out the build folder, but they both seem to be there:

$ ls -l build
total 648
drwxr-xr-x  3 kramer65  staff     102 Feb 13 13:45 _vendor
-rw-r--r--  1 kramer65  staff    2892 Feb 13 13:45
-rw-r--r--  1 kramer65  staff   30516 Feb 13 13:45 ci.go             <===
-rw-r--r--  1 kramer65  staff     123 Feb 13 13:45 deb.changelog
... some other files here
-rw-r--r--  1 kramer65  staff     379 Feb 13 13:45 deb.rules
-rwxr-xr-x  1 kramer65  staff     721 Feb 13 13:45            <===
-rw-r--r--  1 kramer65  staff    1722 Feb 13 13:45 mvn.pom
... and some more files here

I checked whether go is installed and which version it is:

$ which go
$ go version
go version go1.7.5 darwin/amd64

So go seems to be fine.

Does anybody have any idea how I can debug/solve this? All tips are welcome!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dsx5201 2017-02-13 13:07

    Ok, nevermind. Found it. The problem was that line endings where in dos style.

    So to recursively convert line endings to unix I ran:

    find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix

    and then tried building again. That fixed it.

    I hope this helps someone else here. In any case I wish you all a beautiful day!

    点赞 打赏 评论
  • douren1891 2018-03-15 21:55

    I solve the problem using by following instructions below. I don't know the reason, but I completely get rid of brew to make it run. (mac) 1 install go(I used package) 2 git clone 3 cd go-ethereum && git checkout tags/v1.8.2 4 run `find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix`(if you don't have dos2unix, you could brew one, it does not break anything.) 5 make geth 6 ln -s /path/to/origin/geth /path/to/target/geth Then run which geth you could find your geth. Run geth version you can see your version.

    点赞 打赏 评论

相关推荐 更多相似问题