gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 12:05:56 28 4
gpt4 key购买 nike

<分区>

我有简单的 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

有什么提示吗?

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com