尝试使用 buildozer 构建应用程序但返回错误,有人知道出了什么问题吗?

Trying to build an app using buildozer but returned with an error, anyone know whats wrong?

这是问题的日志:

[INFO]:    -> running autogen.sh
           working: /home/taylor/buildozer/.buildozer/android...(and 130 more) Exception in thread background thread for pid 18006:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 1637, in wrap
    fn(*rgs, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 2561, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 2265, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_127: 

  RAN: /home/taylor/buildozer/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh

  STDOUT:
/home/taylor/buildozer/.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.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
    main()
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
    getattr(self, command)(args)
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 213, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
    recipe.build_arch(arch)
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 40, in build_arch
    shprint(sh.Command('./autogen.sh'), _env=env)
  File "/home/taylor/buildozer/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 911, in next
    self.wait()
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 841, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_127: 

  RAN: /home/taylor/buildozer/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh

  STDOUT:
/home/taylor/buildozer/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found


  STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/taylor/buildozer/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21

我不知道这是什么意思。我得到的最接近的是我可能在 buildozer 中缺少一个名为 autoreconf 的文件?如果是这种情况,我将如何解决问题并重新获取此文件?虽然这只是猜测,我不知道我是否接近。

对于某些上下文,我在 Conda 环境中 Linux 上 运行 buildozer,有问题的 .py 文件是用 Python 3.7 编写的,并且存在于相同的环境中。我不确定问题是与规范文件有关还是缺少依赖项或其他问题,我们将不胜感激。

这不是丢失的文件,而是丢失了一个名为 autoreconf 的 linux 包 您需要安装以下依赖项:

  • 自动配置
  • 自动制作
  • libltdl-dev

这是您需要执行的命令 运行:

sudo apt-get install automake autoconf libltdl-dev