-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
brew cleanup: Error: Permission denied @ apply2files #45009
Comments
Could you fill out the issue template please? It's pretty essential in debugging issues. This issue can be reopened once we have all the information needed to start debugging. |
@SMillerDev Yes of course. Sorry for the mess, I accidentally hit the enter key in the title and that submitted this form before I had a chance to fill it out |
I noticed
|
OK now that I had my coffee I see that of course this is likely unrelated to the ruby version mismatch. My apologies. I would like to reopen the issue again so we can discuss if this permission issue is something brew should even address or if this is a fix on a case-by-case basis type of problem. |
What does |
Quite a lot I'm afraid. I'm chewing down on these items as we speak:
The Xcode update is downloading right now but it's taking its sweet little time. I'll report back once it's done. |
You also seem to have a very old homebrew formula version that it's refering to This doesn't say anything about permission issues though, which is good. What does |
|
I encountered this same error after upgrading to Catalina. I solved by uninstalling xcode and reinstalling from app store. Then deleted |
I got
The issue persists. And don't quite know how to best fix that last warning of I tried @michaelwalkerfl's suggestion but Xcode takes hours and hours to download (no idea why) and still has not finished and whilst I deleted aforementioned |
Xcode has since completed installation. The
Unfortunately the workaround presented by @michaelwalkerfl does not seem to solve the issue in my case. |
this work for me . .. Remove and reinstall brew . |
@anasAlsalol Want to add that when you uninstall/reinstall it will also remove all of the packages installed by brew. @phdoerfler I was able to fix this on my machine (OSX Mojave 10.14.6) by resetting the permissions in
Once brew was running again I reinstalled all the packages with FWIW I mapped the Ruby 2.3 headers to get |
Same problem here, always related to the same file:
I chmod'ed it to a+rwx, but still the problem persisted. Once I removed the file, the same problem appeared with another .DS_Store file in the Yarn caches folder. I was able to resolve this by removing the whole Yarn cache, i.e.
Not sure if this causes unwanted side-effects, though. |
@derwaldgeist you might have needed to change the ownership as well, but deleting that folder should be fine since it it will be rebuilt when you run |
This worked for me:
|
The only thing that worked for me was to chmod the folder of the offending program so it could be deleted, so I dont think this was a brew issue, but a permissions issue I probably caused in some other way ... e.g.
|
I ended up with
which did the trick. Is there any chance of brew becoming smart enough to do on its own? |
It does that on install. And at no other point will brew ever have the right to change permissions so it can't. |
Similar problem;
Which was a symlink pointing to a non existent folder at
All good :) |
This fix the bug: sudo chown -R "$(whoami)":admin /usr/local/lib If you are fish shell, this works sudo chown -R (whoami):admin /usr/local/lib First answer in stackoverflow is valid. |
I ran into the issue except it turned out that it's a nonexistent file. Running:
fixed it for me |
|
All these posted fixes are also documented in docs.brew.sh. Gonna close this since we don't need more copies |
@doublesharp worked for me! Thanks! |
Did the job for me! thanks |
@rsclarke-vgw I'm getting this problem: Error: Permission denied @ apply2files - /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.123.0/spaceship/lib/spaceship/connect_api/.DS_Store
|
@nickycutesc see my post above to reset the permissions, or you can just delete that file and try it again -
|
@doublesharp will do, thanks! |
chown, chmod and mkdir -p didn't do it for me, i aggressively ended up with a sudo rm -rf the whole /usr/local/lib/docker/cli-plugins directory... |
If this is a symbolic link, the challenge could be with the destination directory: |
Worked for me. Thank you. |
this command works for me
all upgrade install smoothly, be careful when deleting the path where you found denied on brew. |
@SMillerDev These fixes may be buried in docs.brew.sh somewhere, but this is where google is clearly sending people like me. The brew docs don't even make first page results for the keywords that got me here (and likely others, too). I certainly appreciate the redundant copies here, so thanks everyone! |
brew install
(orupgrade
,reinstall
) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a generalbrew
problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?To help us debug your issue please explain:
brew cleanup
The command completing successfully
brew install
commands)brew cleanup
orbrew cleanup -d -v
The text was updated successfully, but these errors were encountered: