【问题标题】:pyinstaller raspberry pi compiling, how to execute program from command linepyinstaller raspberry pi 编译,如何从命令行执行程序
【发布时间】:2020-04-09 23:47:08
【问题描述】:

这个可执行文件生成在 raspbian linux 上,在我的 raspberry-pi 上:

安装pyinstaller:(我不得不尝试几次,因为我收到错误“http.client.RemoteDisconnected:远程结束关闭连接没有响应”但它突然起作用了):

$ pip3 安装 pyinstaller

在包含我的 tiny_test.py 文件的目录中:

$ pyinstaller -F tiny_test.py

然后,在创建的 dist 文件夹中,我尝试运行编译后的可执行文件: $ tiny_test

这给出了错误:

“tiny_test: tiny_test: 无法执行二进制文件”

【问题讨论】:

    标签: python raspberry-pi pyinstaller executable


    【解决方案1】:

    简短回答:

    $ ./tiny_test

    长解析器:

    检查可执行文件属性:

    $ 文件 tiny_test

    "tiny_test:ELF 32 位 LSB 可执行文件,ARM,EABI5 版本 1 (SYSV),动态链接,解释器 /lib/ld-linux-armhf.so.3,适用于 GNU/Linux 3.2.0,BuildID[sha1 ]=ad32521ad141d04ca4fc066798301621367c7964,剥离"

    LSB 可执行文件需要这样运行:

    $ ./tiny_test

    这对我有用!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-24
      • 2015-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多