brew: Error: parent directory is world writable but not sticky
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
- are reporting a bug others will be able to reproduce and not asking a question. If you’re not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh NOTE: I went to Discourse first; see https://discourse.brew.sh/t/parent-directory-is-world-writable-but-not-sticky/3386/5
- ran a
brewcommand and reproduced the problem with multiple formulae? If it’s a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it’s abrew caskproblem 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. - ran
brew updateand can still reproduce the problem? - ran
brew doctor, fixed all issues and can still reproduce the problem? NOTE: I can’t upgrade the OS here. - ran
brew configandbrew doctorand included their output with your issue?
To help us debug your issue please explain:
What you were trying to do (and why)
I was attempting to use Homebrew/Linuxbrew in any capacity. Installation of Homebrew fails. Installation of packages (with a previous installation) fail.
The key point here is that I’m stuck on macOS 10.11, which brew doctor calls out as being unsupported. I’m having very similar failures on CentOS 7.
I first brought this up on the Discourse: https://discourse.brew.sh/t/parent-directory-is-world-writable-but-not-sticky/3386/5.
In that post I discuss how my Homebrew was in a non-standard location, but just now I’ve cleared up my environment and tried with a fresh Homebrew at /usr/local, and I get the same problems.
What happened (include command output)
Please see https://gist.github.com/mikeboers/c9b222de6598903ef313fd8c3829c768 for command output.
I tried to debug this, but I’m a Python dev who isn’t very familiar with Ruby. I added tons of puts all over the place, and it seems that all of my various errors go through /usr/local/vee/homebrew/Library/Homebrew/extend/pathname.rb:167:in atomic_write.
Printing out the path returned from Dir.mktempdir, I get (with my non-standard location of /usr/local/vee/homebrew):
/usr/local/vee/homebrew/Cache/.d20181106-21948-1xpbf73/.linkage.json20181106-21948-pef1lk/usr/local/vee/homebrew/Cellar/gmp/6.1.2_2/.d20181106-21948-zs3nsx/.INSTALL_RECEIPT.json20181106-21948-1ppv98h
and a few others.
What seems very strange is that sometimes INSTALL_RECEIPT ones go through, and sometimes not.
What you expected to happen
Temp directories to be creatable for the various processes.
Step-by-step reproduction instructions (by running brew commands)
Failed clean installation:
sudo rm /usr/local
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Installing packages does much the same thing.
Honestly… if this is going to be declared that you don’t support these OSes, that is fine. My client will have to deal with paying me to work around it. I’d just like to know and move on. Homebrew is one part of the stack here, and I have the capability of building my own packages, but it has been such an immense convenience for the ~5 years that I’ve used Homebrew in this way for my clients. I’d really rather hope that someone sees an easy fix despite not being officially supported.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
Agreed on submitting the PR.
It would be good to disclose this earlier in future. This is almost certainly the root of the problems.
Feel free to submit your fix as a PR, it’s easier to review that way.