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

flutter run failed with permission denied (copy to /usr/local/) why? #70

Open
sgon00 opened this issue Jan 25, 2022 · 2 comments
Open

Comments

@sgon00
Copy link

sgon00 commented Jan 25, 2022

$ flutter run -d linux
Launching lib/main.dart on Linux in debug mode...
CMake Error at cmake_install.cmake:66 (file):
  file INSTALL cannot copy file
  "/home/user/flutter-folio/build/linux/x64/debug/intermediates_do_not_run/flutter_folio"
  to "/usr/local/flutter_folio": Permission denied.

Building Linux application...                                           
Exception: Build process failed

This problem is really weird to me. I am not installing anything. I just want to run the project to see a demo app. Why does it try to install something to my /usr/local/ directory?

First, I don't think it should install anything when I run flutter run -d linux.
Second, even if it has to install something, it should install to a local path instead of system path. /usr/local/ is owned by root.

Thanks a lot.

@sgon00
Copy link
Author

sgon00 commented Jan 25, 2022

I figured out the problem can be fixed by executing flutter clean,
and then flutter run -d linux again.
But I have no ideas why the clean command will make flutter not copy the executable file to anywhere.

@hrydi
Copy link

hrydi commented Apr 11, 2022

for me, i just removed linux directory in flutter-folio root directory
and then generate new one from other directory (create new directory) and exec flutter create --platforms=linux .
and then copy linux directory from that folder to flutter-folio
and executing flutter run -d linux

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

No branches or pull requests

2 participants