Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While runnng project on local system i'm getting "fatal error: 'cairo/cairo.h' file not found" Error #1460

Closed
KaranDuggal opened this issue Oct 14, 2023 · 4 comments · Fixed by #1524

Comments

@KaranDuggal
Copy link

While running project on local system. i'm getting "fatal error: 'cairo/cairo.h' file not found" Error

i'm using flutter 3.10.6 version, fvm 2.4.1 and ubuntu 22.04

help me how i can run your project on locally

image

@d-loose
Copy link
Member

d-loose commented Oct 16, 2023

Please ensure you have installed flutter and the linux toolchain correctly by running flutter doctor -v.

@KaranDuggal
Copy link
Author

KaranDuggal commented Oct 21, 2023

I have install the toolchain packages. see the below screenshot
image

now I'm getting different error.

This will generate a JSON format file containing all messages that 
need to be translated.
Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                   
/media/duggal/ssd_storage/programming/ubuntu/app-center/linux/flutter/ephemeral/.plugin_symlinks/handy_window/linux/handy_window_plugin.cc:9:10: fatal error: 'functional' file not found
/media/duggal/ssd_storage/programming/ubuntu/app-center/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/linux/url_launcher_plugin.cc:10:10: fatal error: 'cstring' file not found
/media/duggal/ssd_storage/programming/ubuntu/app-center/linux/flutter/ephemeral/.plugin_symlinks/screen_retriever/linux/screen_retriever_plugin.cc:7:10: fatal error: 'cstring' file not found
Exception: Build process failed

image

@KaranDuggal
Copy link
Author

Now i'm getting below error. please help me how i can fix this error.
image

"fa": 81 untranslated message(s).
"fr": 16 untranslated message(s).
"hu": 79 untranslated message(s).
"id": 81 untranslated message(s).
"it": 68 untranslated message(s).
"ja": 69 untranslated message(s).
"ko": 79 untranslated message(s).
"pt": 73 untranslated message(s).
"tr": 88 untranslated message(s).
"uk": 69 untranslated message(s).
"zh": 70 untranslated message(s).
"zh_Hant": 68 untranslated message(s).
To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 


This will generate a JSON format file containing all messages that 
need to be translated.
Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                   
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: /media/duggal/ssd_storage/programming/ubuntu/app-center/build/linux/x64/debug/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/ninja cmTC_93263 && [1/2] Building CXX object CMakeFiles/cmTC_93263.dir/testCXXCompiler.cxx.o
    [2/2] Linking CXX executable cmTC_93263
    FAILED: cmTC_93263 
    : && /usr/bin/clang++   CMakeFiles/cmTC_93263.dir/testCXXCompiler.cxx.o -o cmTC_93263   && :
    /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:3 (project)


Exception: Unable to generate build files`

@Cevedale
Copy link

Cevedale commented Dec 5, 2023

you should install Cairo on your Ubuntu system:
sudo apt-get install libcairo2-dev

verify that your Flutter project has the correct dependencies specified in the 'pubspec.yaml' file.
dependencies:
cairo: ^0.9.0

update Flutter and FVM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants