4

I'm running into:

Error: parent directory is world writable but not sticky

While trying to do:

brew install yarn

Error: parent directory is world writable but not sticky
Please report this bug:
https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
/var/lib/jenkins/.linuxbrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/tmpdir.rb:92:in `mktmpdir'

Does anybody know how to resolve this?

deltab
  • 2,498
  • 23
  • 28
HosseinK
  • 1,247
  • 4
  • 13
  • 18
  • 5
    Looks like a permission problem. Mentioned in [here](https://github.com/Homebrew/legacy-homebrew/issues/39170#issuecomment-97367623). Based on that fix is: `sudo chmod +t /tmp` – Arash Mar 20 '17 at 02:38
  • Thanks Arash. Could you tell me what the full path to /tmp is? I'm confused what it is referring to. – HosseinK Mar 21 '17 at 03:03
  • Take a look [here](https://github.com/Homebrew/legacy-homebrew/issues/39475). They are discussing the same problem. I think you need to do `sudo chmod +t /private/tmp`. Give it a try. – Arash Mar 21 '17 at 03:09

3 Answers3

10

It is a permission problem, When I am trying to install brew install yarn --without-node, Got this error, on my Mac OSx Sierra

First, find out where is your tmp directory using ls -ld /tmp When I ran this command, got the output in following way,

ls -ld /tmp
lrwxr-xr-x@ 1 root  wheel  11 Jan 28  2017 /tmp -> private/tmp

which means tmp directory is using private/tmp So try giving the permission by using following command

sudo chmod +t /private/tmp
Rakesh James
  • 624
  • 7
  • 13
4

I had a similar error, but in my case the directory with bad permissions was ~/Library/Caches/Homebrew.

chmod +t ~/Library/Caches/Homebrew

fixed it.

bfontaine
  • 18,169
  • 13
  • 73
  • 107
2

Homebrew/Ruby wants to set sticky bit (+t) permission on /private/tmp folder. Set it explicitly using

sudo chmod +t /private/tmp 

will solve the issue. Brew command should work fine after this.

Praym
  • 2,038
  • 23
  • 21