python - Pyinstaller 在 Linux 上失败,缺少 `objcopy`

标签 python linux pyinstaller

<分区>

我有简单的 python 代码打印 hello (hello.py),我想使用 pyinstaller 使其可执行,以便在 Linux 上运行:

#!/usr/bin/python3.5
#!/usr/bin/env python3.5

def welcome():
    print('Welcome')

welcome()

我应用命令 pyinstaller hello.py 并以以下异常结束:

6204 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
6205 INFO: Bootloader /home/nour/.local/lib/python3.5/site-packages/PyInstaller/bootloader/Linux-64bit/run
6206 INFO: checking EXE
6206 INFO: Building EXE because out00-EXE.toc is non existent
6206 INFO: Building EXE from out00-EXE.toc
6206 INFO: Appending archive to ELF section in EXE /home/nour/python/build/hello/hello
Traceback (most recent call last):
  File "/home/nour/.local/bin/pyinstaller", line 9, in <module>
    load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
  <...>
  File "/usr/lib64/python3.5/subprocess.py", line 1282, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'objcopy'

我已经尝试过但没有帮助的:

  • 我将 python3.5 更改为 python3 和 python

有什么提示吗?

最佳答案

问题在一周左右后没有任何改变就消失了

关于python - Pyinstaller 在 Linux 上失败,缺少 `objcopy`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50740133/

相关文章:

c - 共享内存读取修改数组

linux - 'find . -ls' 的输出格式是什么?

python - 如何在另一台未安装 Python 的计算机上运行 Python.exe?

Python:为什么这段代码会执行?

python - Decimal.quantize 引发 InvalidOperation

python - Eclipse 随机用空格替换制表符

python - Pyinstaller - Matplotlib 安装被破坏 - 无法执行 scrypt

python - 在 Mac OS X 上安装 PIL 以与 Django 一起使用

c - 如何知道我的 openssl 是否支持 sslv3

python - 是否可以在 Gitlab CI 上运行 X11?