gpt4 book ai didi

How do I solve OSError: [Errno 8] Exec format error during compliation of kivy python code in ubuntu(如何解决OSError:[Errno 8]在ubuntu中编译kivy python代码时出现Exec格式错误)

转载 作者:bug小助手 更新时间:2023-10-28 20:38:24 27 4
gpt4 key购买 nike



I made an app for my thesis project, and for the life of me it will not compile. I followed so many tutorials and nothing works. The error I generally get is this:

我为我的论文项目做了一个应用程序,但在我的一生中,它是不会编译的。我遵循了这么多教程,但都没有奏效。我通常得到的错误是:



OSError: [Errno 8] Exec format error: '/home/marouane/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager'



I will paste the full log in here, please if anyone has any idea:

我会在这里粘贴完整的日志,如果有任何人有任何想法:


the error logs screenshot for better view

错误日志屏幕截图,以便更好地查看


# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /home/marouane/.local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-18-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-18-openjdk-amd64/bin/keytool
# Install platform
# Run ['git', 'config', '--get', 'remote.origin.url']
# Cwd /mnt/c/users/marou/Groce/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run ['git', 'branch', '-vv']
# Cwd /mnt/c/users/marou/Groce/.buildozer/android/platform/python-for-android
* master 0daa74c8 [origin/master] Merge pull request #2796 from misl6/release-2023.05.21
# Run ['/usr/bin/python3', '-m', 'pip', 'install', '-q', '--user', 'appdirs', 'colorama>=0.3.3', 'jinja2', 'sh>=1.10, <2.0; sys_platform!="nt"', 'pep517', 'toml', 'packaging']
# Cwd None
# Apache ANT found at /home/marouane/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/marouane/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 25b
# Android NDK found at /home/marouane/.buildozer/android/platform/android-ndk-r25b
# Installing/updating SDK platform tools if necessary
# Run ['/home/marouane/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager', '--sdk_root=/home/marouane/.buildozer/android/platform/android-sdk', 'platform-tools']
# Cwd /home/marouane/.buildozer/android/platform/android-sdk
Traceback (most recent call last):
File "/home/marouane/.local/bin/buildozer", line 8, in <module>
sys.exit(main())
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 1024, in run_command
self.target.run_commands(args)
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/target.py", line 93, in run_commands
func(args)
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/target.py", line 103, in cmd_debug
self.buildozer.prepare_for_build()
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 172, in prepare_for_build
self.target.install_platform()
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 616, in install_platform
self._install_android_packages()
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 541, in _install_android_packages
self._android_update_sdk('platform-tools')
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 481, in _android_update_sdk
ret_child = self._sdkmanager(*sdkmanager_commands, **kwargs)
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 196, in _sdkmanager
return self.buildozer.cmd(command, **kwargs)
File "/home/marouane/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 289, in cmd
process = Popen(command, **kwargs)
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/marouane/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager'

I am using WSL and Ubuntu. I tried so many guides and videos, I always installl all of the packages and follow the buildozer guides of installation and quickstart.

我正在使用WSL和Ubuntu。我尝试了这么多指南和视频,我总是安装所有的包,并遵循构建指南的安装和快速入门。


My Python code itself does not mention buildozer anywhere and I was wondering maybe that is the issue.

我的Python代码本身在任何地方都没有提到生成器,我想知道这可能就是问题所在。


And when I went to the file directory that is mentioned in the error it looked like this:

当我转到错误中提到的文件目录时,它看起来如下所示:


Os Error directory

操作系统错误目录


更多回答

The message is pretty clear. Whatever's in the file ..../bin/sdkmanager is corrupted somehow. Where is this file from?

这传达的信息非常明确。文件中的内容.../bin/sdkManager不知何故已损坏。这个文件是从哪里来的?

优秀答案推荐
更多回答

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