[英]There's a problem when I compile py file to apk through buildozer
When compile a very simple "Hello World" kivy file to apk.将一个非常简单的“Hello World”kivy 文件编译为 apk 时。 But an error occured.但是发生了错误。
[INFO]: -> running autogen.sh
Exception in thread background thread for pid 10006:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_127:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found
STDERR:
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
main()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
args, "ignore_setup_py", False
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
recipe.build_arch(arch)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 33, in build_arch
shprint(sh.Command('./autogen.sh'), _env=env)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
for line in output:
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 863, in next
self.wait()
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_127:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found
============================================================================= It's just a pretty simple py with kivy file but I don't expected to get this Error. ==================================================== =========================== 这只是一个带有 kivy 文件的非常简单的 py,但我不希望得到这个错误。 So Please Help me!!所以请帮助我! Many Thanks!!!非常感谢!!!
Update: After installed autoconf, I tried to compile again, but another error occured.更新:安装autoconf后,我尝试再次编译,但又出现了一个错误。
Log:日志:
Exception in thread background thread for pid 9679:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
STDERR:
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
main()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
args, "ignore_setup_py", False
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
recipe.build_arch(arch)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 33, in build_arch
shprint(sh.Command('./autogen.sh'), _env=env)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
for line in output:
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 863, in next
self.wait()
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
STDERR:
I need to compile it now, but I don't know how to fix it.我现在需要编译它,但我不知道如何修复它。 Please help me again!请再次帮助我! Many thanks非常感谢
You are missing the libtool
library.您缺少libtool
库。 This command should solve your problem.该命令应该可以解决您的问题。
sudo apt-get update
sudo apt-get install libtool
You need to install the autoconf
package:您需要安装autoconf
package:
sudo apt-get install autoconf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.