在Ubuntu例行升级后,我的系统构建失败了。它现在使用的是gcc 14,我猜它想要13?
我试着按照这里的说明操作,但我不知道如何进行系统链接
请一步一步地给予我该输入什么。
错误构建输出如下:
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /mnt/Data/git/tipitaka-pali-reader/build/linux/x64/release/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_4da98 && [1/2] Building CXX object CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o
[2/2] Linking CXX executable cmTC_4da98
FAILED: cmTC_4da98
: && /usr/bin/clang++ CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o -o cmTC_4da98 && :
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
Building Linux application...
Unable to generate build files
下面是Flutter医生:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.7, on Ubuntu 22.04.1 LTS 5.15.0-53-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 (version 1.73.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
我很确定我需要13。它已安装并重新安装,但未显示在下面:
$ clang++ --version
Ubuntu clang version 14.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
1条答案
按热度按时间13z8s7eq1#
似乎未列出新的依赖项。https://github.com/flutter/flutter/issues/115909
重新安装所有依赖项(现在包含在此处)