pyinstaller 文件太大,内存放不下

pyinstaller file too big to fit in memory

我正在尝试将这个简单的脚本转换为 .exe。

 #!/usr/bin/python

print "pyinstaller is nice!"

命令是:

pyinstaller toExe.py

输出为:

6 INFO: wrote /tmp/toExe.spec
17 INFO: UPX is available.
26 INFO: Processing hook hook-os
73 INFO: Processing hook hook-time
74 INFO: Processing hook hook-cPickle
105 INFO: Processing hook hook-_sre
155 INFO: Processing hook hook-cStringIO
198 INFO: Processing hook hook-encodings
204 INFO: Processing hook hook-codecs
395 INFO: Extending PYTHONPATH with /tmp
396 INFO: checking Analysis
396 INFO: building because toExe.py changed
396 INFO: running Analysis out00-Analysis.toc
413 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/_pyi_bootstrap.py
418 INFO: Processing hook hook-os
427 INFO: Processing hook hook-site
434 INFO: Processing hook hook-encodings
478 INFO: Processing hook hook-time
479 INFO: Processing hook hook-cPickle
510 INFO: Processing hook hook-_sre
561 INFO: Processing hook hook-cStringIO
609 INFO: Processing hook hook-codecs
837 INFO: Processing hook hook-pydoc
893 INFO: Processing hook hook-email
918 INFO: Processing hook hook-httplib
936 INFO: Processing hook hook-email.message
967 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py
984 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_archive.py
1004 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_carchive.py
1020 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_os_path.py
1025 INFO: Analyzing toExe.py
1026 INFO: Hidden import 'codecs' has been found otherwise
1026 INFO: Hidden import 'encodings' has been found otherwise
1026 INFO: Looking for run-time hooks
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
1138 INFO: Using Python library /usr/lib/libpython2.7.so.1.0
1138 INFO: Adding Python library to binary dependencies
1238 INFO: /tmp/build/toExe/out00-Analysis.toc no change!
1241 INFO: checking PYZ
1243 INFO: checking PKG
1243 INFO: building because toExe.py changed
1244 INFO: building PKG (CArchive) out00-PKG.pkg
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
1264 INFO: checking EXE
1264 INFO: rebuilding out00-EXE.toc because toExe missing
1264 INFO: building EXE from out00-EXE.toc
1269 INFO: Appending archive to EXE /tmp/build/toExe/toExe
1270 INFO: checking COLLECT
1270 INFO: building COLLECT out00-COLLECT.toc

我在 windows 7 和 XP 中对其进行了测试,但总是收到相同的消息:文件太大,无法放入内存。 我的 python 版本是 Kali linux 上的 2.7.3。

谢谢。

"Program too big to fit into memory" means that the executable file's header is corrupt or the file has incorrect format.

您是否有机会在 Windows 中 运行 一个 Linux 可执行文件?

(Windows 可执行文件以 "MZ" 开头,Linux ELF 可执行文件以“⌂ELF”开头)