Bhi*_*uti 5 gcc cmake clang++ flutter
例行升级 Ubuntu 后,我的系统构建失败。\n现在使用的是 gcc 14,我猜它需要 13?
\n我尝试按照此处的说明进行操作,但我不知道如何进行系统链接
\n请逐步回答我要输入的内容。
\n错误构建输出如下:
\nCMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):\n The C++ compiler\n\n "/usr/bin/clang++"\n\n is not able to compile a simple test program.\n\n It fails with the following output:\n\n Change Dir: /mnt/Data/git/tipitaka-pali-reader/build/linux/x64/release/CMakeFiles/CMakeTmp\n\n Run Build Command(s):/usr/bin/ninja cmTC_4da98 && [1/2] Building CXX object CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o\n [2/2] Linking CXX executable cmTC_4da98\n FAILED: cmTC_4da98 \n : && /usr/bin/clang++ CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o -o cmTC_4da98 && :\n /usr/bin/ld: cannot find -lstdc++: No such file or directory\n clang: error: linker command failed with exit code 1 (use -v to see invocation)\n ninja: build stopped: subcommand failed.\n\n\n\n\n\n CMake will not be able to correctly generate this project.\nCall Stack (most recent call first):\n CMakeLists.txt:2 (project)\n\n\nBuilding Linux application... \nUnable to generate build files\nRun Code Online (Sandbox Code Playgroud)\n颤振医生如下:
\n$ flutter doctor\nDoctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 3.3.7, on Ubuntu 22.04.1 LTS 5.15.0-53-generic, locale en_US.UTF-8)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 33.0.0)\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Linux toolchain - develop for Linux desktop\n[\xe2\x9c\x93] Android Studio (version 2021.3)\n[\xe2\x9c\x93] VS Code (version 1.73.1)\n[\xe2\x9c\x93] Connected device (2 available)\n[\xe2\x9c\x93] HTTP Host Availability\nRun Code Online (Sandbox Code Playgroud)\n我很确定我需要 13。它已安装并重新安装,但未显示如下:
\n $ clang++ --version\n Ubuntu clang version 14.0.0-1ubuntu1\n Target: x86_64-pc-linux-gnu\n Thread model: posix\n InstalledDir: /usr/bin\nRun Code Online (Sandbox Code Playgroud)\n
似乎没有列出新的依赖项。 https://github.com/flutter/flutter/issues/115909
重新安装所有依赖项(现在包含在此处)
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1337 次 |
| 最近记录: |