[Feedback on issues] Deepin 25 中运行FlutterLinux桌面端运行报错 Resolved
Tofloor
poster avatar
MtKrban
deepin
2025-09-22 08:01
Author
kurban@kurban:~/StudioProjects/demo1$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.4, on Deepin 25 6.12.41-amd64-desktop-rolling, locale zh_CN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2025.1.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2025.2)
[✓] VS Code (version 1.104.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!
kurban@kurban:~/StudioProjects/demo1$ flutter run -d linux
Launching lib/main.dart on Linux in debug mode...
CMake Error at /usr/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:73 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/kurban/StudioProjects/demo1/build/linux/x64/debug/CMakeFiles/CMakeScratch/TryCompile-6WKZ2H'

    Run Build Command(s): /usr/bin/ninja -v cmTC_094ae
    [1/2] /usr/bin/clang++    -MD -MT CMakeFiles/cmTC_094ae.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_094ae.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_094ae.dir/testCXXCompiler.cxx.o -c /home/kurban/StudioProjects/demo1/build/linux/x64/debug/CMakeFiles/CMakeScratch/TryCompile-6WKZ2H/testCXXCompiler.cxx
    [2/2] : && /usr/bin/clang++   CMakeFiles/cmTC_094ae.dir/testCXXCompiler.cxx.o -o cmTC_094ae   && :
    FAILED: cmTC_094ae 
    : && /usr/bin/clang++   CMakeFiles/cmTC_094ae.dir/testCXXCompiler.cxx.o -o cmTC_094ae   && :
    /usr/bin/ld: 找不到 -lstdc++: 没有那个文件或目录
    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:3 (project)


Building Linux application...                                       
Error: Unable to generate build files
kurban@kurban:~/StudioProjects/demo1$ 
Reply Favorite View the author
All Replies
NoahLiu
deepin
2025-09-22 09:14
#1

🤧 借帖子说下,Flutter 客户端的托盘图标会显示两份~,两份还有不同的弹出菜单,

一份是 DTK 的

一份不知道是 GTK 还是QT 的反正丑一些

都能正常的响应按键事件

Reply View the author
翻过山峰看见云
deepin
2025-09-22 09:38
#2

去搜了下"/usr/bin/clang++" is not able to compile a simple test program,挺多人遇到类似问题的,看了下大概首先需要安装libstdc++,其次cmake中指定clang++路径。

Reply View the author
DebuggerX
deepin
2025-09-22 10:06
#3
翻过山峰看见云

去搜了下"/usr/bin/clang++" is not able to compile a simple test program,挺多人遇到类似问题的,看了下大概首先需要安装libstdc++,其次cmake中指定clang++路径。

Reply View the author
MtKrban
deepin
2025-09-26 14:31
#4
sudo apt update
sudo apt install --yes libstdc++-13-dev g++-13

使用这个命令修复,已解决。

Reply View the author