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

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

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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵