dongxinjun3944 2017-02-13 12:56
浏览 1408
已采纳

编译失败:没有这样的文件或目录(但确实存在!)

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

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

As far as I understand from this error it complaints that either build/env.sh 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 ci-notes.md
-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 env.sh            <===
-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
/usr/local/bin/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!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图