Closed ClashTheBunny closed 6 years ago
Here's the traceback:
Error: Permission denied @ dir_initialize - /usr/local/Cellar/.fseventsd
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:442:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:442:in `foreach'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:442:in `children'
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:344:in `subdirs'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1374:in `block in racks'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1373:in `reject'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1373:in `racks'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:1000:in `check_for_unlinked_but_not_keg_only'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:46:in `block in doctor'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
By default, they'll be owned by root. So you need to sudo chown -R $(whoami) /usr/local/*
them.
I tried that, and only got this far:
Notice I said /usr/local/* not /usr/local
/usr/local itself is off limits to chown'ing and chmod'ing
I did do it recursively, but it is the same with the subdirectory glob:
and things do seem to be owned by me:
ls -lah /usr/local/include/.fseventsd ⏎
total 35
drwx------ 3 rmason admin 3B Jan 19 11:13 .
drwxrwxr-x@ 302 rmason staff 302B Jan 19 14:37 ..
-rw------- 1 rmason admin 36B Jan 19 11:13 fseventsd-uuid
Hmm. That is interesting. I'll see if I can reproduce it.
Thanks so much!
On Fri, Jan 19, 2018, 15:21 ilovezfs notifications@github.com wrote:
Hmm. That is interesting. I'll see if I can reproduce it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openzfsonosx/zfs/issues/625#issuecomment-359092439, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPKKd3-F5ItELnazsmZVQBlptk8Z6kFks5tMQdvgaJpZM4Rk6hL .
Seems to work fine for me: https://gist.github.com/ilovezfs/838fb922b340281ed8ee259bb4327119
You're missing some of the top level directories so that may be related.
Ah no. There we go
Joes-Mac:zfs ilovezfs$ brew unlink gpg-agent
Unlinking /usr/local/Cellar/gpg-agent/2.0.31... Error: Resource busy @ dir_s_rmdir - /usr/local/share
Joes-Mac:zfs ilovezfs$
hmm
@ClashTheBunny I think this diff fixes it
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 8e10971e1..b4311f13f 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -255,7 +255,7 @@ class Pathname
else
false
end
- rescue Errno::EACCES, Errno::ENOENT
+ rescue Errno::EACCES, Errno::ENOENT, Errno::EBUSY
false
end
@ClashTheBunny I've opened https://github.com/Homebrew/brew/pull/3702
@ClashTheBunny You will also want https://github.com/Homebrew/brew/pull/3703
Both PRs have been merged so this should now be fixed.
Those worked perfectly!! Thanks so much!
brew
command and notbrew install
ing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/newbrew update
and retried your prior step?brew doctor
, fixed all issues and retried your prior step?brew config
andbrew doctor
and included their output with your issue?To help us debug your issue please explain:
brew
commands) Try to mount /usr/local on high sierra Give up and make sub volumes for each brew directory Watch it fail on the autocreated ZFS directories like .fseventsd.