Flutter:无法为桌面生成构建文件



就在今天我在linux上运行我的应用程序,但现在我无法运行它,因为每当我尝试运行应用程序时,它都会给我这个错误。我不知道它有什么问题

/usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so: undefined symbol: g_tls_channel_binding_error_quark
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
/snap/flutter/130/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/../../../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
/snap/flutter/130/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/../../../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
CMake Error at /snap/flutter/130/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/snap/flutter/130/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
flutter/ephemeral/.plugin_symlinks/desktop_webview_auth/linux/CMakeLists.txt:21 (pkg_check_modules)

Exception: Unable to generate build files
Exited (sigterm)
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.8, on Ubuntu 22.04.1 LTS 5.15.0-52-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] VS Code
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!

我通过使用以下命令找到了解决方案:

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev

和这两个

flutter config --enable-linux-desktop

sudo apt install liblzma-dev

相关内容

  • 没有找到相关文章