Repository navigation
Done
Labels
P2Important issues not at the top of the work lista: first hourThe first hour of using Flutterplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-linuxTriaged by the Linux platform team
Description
Running "flutter run" on linux can fail because of permissions to "/usr/local". It is surprising that it would make this complaint. The issue was previously reported and closed but not fixed. I'm making a new issue.
Error log
clarkeaa@gamer:~/dev/flutter-examples/counter$ flutter run
Launching lib/main.dart on Linux in debug mode...
CMake Error at cmake_install.cmake:66 (file):
file INSTALL cannot copy file
"/home/clarkeaa/dev/flutter-examples/counter/build/linux/x64/debug/intermediates_do_not_run/counter"
to "/usr/local/counter": Permission denied.
Flutter doctor
[✓] Flutter (Channel stable, 3.3.8, on Ubuntu 22.04.1 LTS 5.15.68.1-microsoft-standard-WSL2, locale C.UTF-8)
• Flutter version 3.3.8 on channel stable at /home/clarkeaa/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 52b3dc25f6 (7 days ago), 2022-11-09 12:09:26 +0800
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 14.0.0-1ubuntu1
• cmake version 3.22.1
• ninja version 1.10.1
• pkg-config version 0.29.2
Environment
Ubuntu 22.04.1 LTS on Windows Linux Subsystem
Previously reported workaround
run flutter clean and try again
Previously closed issue
Reacted by Miguel Beltran, Nathanael Anderson, Matt Von Bargen, fusion44, Jacob Bang, Lukas Klingsbo, Muhammad Yousif, Hannes Ortmeier, ynot01, John "codefu" McDole and 4 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work lista: first hourThe first hour of using Flutterplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-linuxTriaged by the Linux platform team
Activity
stuartmorgan-g commentedon Nov 15, 2022
Are you able to reproduce it? It's been closed a number of times because nobody who sees it can ever reproduce it more than once. My working theory is that it's a CMake bug.
stuartmorgan-g commentedon Nov 15, 2022
This is my previous summary of the issue: #73881 (comment)
gaaclarke commentedon Nov 15, 2022
I deleted that project, created a new one and the permissions problem didn't show up again. I'm not sure what is being cached where that causes it to behave differently.
The problem with this bug is that it affects first time user experience which isn't good.
ZimboPro commentedon Jun 17, 2023
The issue was happening consistently for me, I managed to fix the issue by doing the following in linux/CMakeLists.txt
to
More info can be found in the linked issue above.
shassard commentedon Jun 24, 2023
I ran into this issue with a fresh manual install of flutter 3.10.5 on void linux when creating a new project without all of the required build dependencies installed (no cmake, ninja, gtk+) and then attempting a build which fails, then installing all the dependencies. The project was broken at this point, but creating a new project even after removing all the dependencies and trying to reproduce the issue didn't result in a repro.
cathino commentedon Dec 18, 2023
I run the command:
flutter run -d linux, and got error:Flutter version is: 3.16.3.
After using @ZimboPro 's method, it works:
pavlov061356 commentedon Feb 27, 2024
That worked for me, thx
lomby92 commentedon Mar 14, 2024
Environment
Flutter
I run
flutter cleanand it fixed the errorFix permission error on linux as per flutter/flutter#115376
4 remaining items
YousefAK009 commentedon May 22, 2025
worked for me. thanks
jvies commentedon Oct 28, 2025
The problem happened for me too on my first flutter app.
jtmcdole commentedon Dec 5, 2025
I ran into this as well:
flutter run -d linuxwould fail with gtk+-3.0 not found - I'm going to assume this is where the bad state is created.flutter run -d linuxnow wants to copy to /usr/localflutter clear; flutter run -d linuxworksUnsetting PKG_CONFIG_PATH reproduces this.
hlovdal commentedon Dec 19, 2025
This happened for me today. Fedora 43, using the "dart-code.flutter" extension in vs-code, selecting "Flutter: New project", "Application". Flutter not installed in advance, the "Flutter: Run flutter doctor" command eventually got it installed into /opt/flutter_dsk (owned by my user).
First attempt to run resulted in error:
Similar to @oliver-hrkltz I also installed
gtk3-develpackage after a first failed build attempt. Runningflutter cleanandflutter build linuxmanually in the command window eventually resolved the issue.yoshiask commentedon May 7, 2026
I also ran into this issue after manually setting up the Flutter SDK on Fedora 43 KDE. The first build failed due to missing gtk-3.0 dependency so I installed
gtk3-devel. Second and third build attempts failed trying to copy to/usr/local/xxxx. A fourth build ran successfully after runningflutter clean.Fix desktop apps installing to the system prefix after a failed build (…