-
Notifications
You must be signed in to change notification settings - Fork 28.6k
linux run fails with "/usr/local" permissions #115376
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
Comments
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. |
This is my previous summary of the issue: #73881 (comment) |
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. |
The issue was happening consistently for me, I managed to fix the issue by doing the following in linux/CMakeLists.txt set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif() to set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) More info can be found in the linked issue above. |
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. |
I run the command:
Flutter version is: 3.16.3. After using @ZimboPro 's method, it works:
|
That worked for me, thx |
Environment
Flutter
I run |
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
I had the same issue, but like @shassard suggests, it was most likely caused by attempting to build without having all system dependencies met. Installing dependencies and doing |
I seem to have found a possible reason. I am using Flutter version 3.22.3 to build a project that depends on media_kit. On Ubuntu, if the libmpv-dev dependency is not installed in advance, it will give an error: CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR). After I installed libmpv-dev, running flutter build linux triggered this problem: Permission denied to "/usr/local/counter". I have to run flutter clean and then flutter build linux to resolve it. |
I had the same issue today on a new Debian setup. First I did the build with a missing lib (libgtk-3-dev) and after adding the lib and rebuild I had the issue mentioned in this topic:
After doing P.S. |
worked for me. thanks |
Uh oh!
There was an error while loading. Please reload this page.
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
Flutter doctor
Environment
Ubuntu 22.04.1 LTS
on Windows Linux SubsystemPreviously reported workaround
run
flutter clean
and try againPreviously closed issue
#59890
The text was updated successfully, but these errors were encountered: