donglou8371 2016-09-16 14:29
浏览 484

运行用Go编写的可执行文件时找不到文件

If I build https://github.com/m3europe/procwrap on go 1.7.1 on alpine and try to run the binary on ubuntu trusty I get file not found, and the same if I build on trusty and try to run on alpine. I suspect this is to do with linking somehow but I'm a little out of my depth here having spent most of my career so far in managed execution environments. My seemingly naive understanding is that an AMD64 build should work on any AMD64 linux distro, no?

The below Dockerfile demonstrates the issue. The executable downloaded at line 6 was built on golang:1.7.1-alpine image:

FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install -y wget
RUN mkdir /procwrap
WORKDIR /procwrap
RUN wget https://github.com/myles-mcdonnell/procwrap/releases/download/v1.0.0/procwrap.v1.amd64 -O procwrap
RUN wget https://raw.githubusercontent.com/myles-mcdonnell/procwrap/master/procwrap.toml -O procwrap.toml
RUN chmod +x procwrap
CMD ./procwrap -v
  • 写回答

1条回答 默认 最新

  • dqys98341 2016-09-16 15:27
    关注

    Use ldd you-bin-path to print shared library dependencies, maybe the two system have different lib path structure.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料