When installing pyenv locally, the following error occurred:
➜ brew install pyenv
==> Downloading https://github.com/yyuu/pyenv/archive/v20160310.tar.gz
Already downloaded: /Library/Caches/Homebrew/pyenv-20160310.tar.gz
Error: parent directory is world writable but not sticky
Please report this bug:
https://git.io/brew-troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:92:in `mktmpdir'
/usr/local/Library/Homebrew/utils/fork.rb:6:in `safe_fork'
/usr/local/Library/Homebrew/formula_installer.rb:572:in `build'
/usr/local/Library/Homebrew/formula_installer.rb:231:in `install'
/usr/local/Library/Homebrew/cmd/install.rb:214:in `install_formula'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `block in install'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `install'
/usr/local/Library/brew.rb:83:in `<main>'
Solution:
first check the read and write permissions of the folder of your own /private/tmp, as follows on my mac machine:
➜ ls -ld /tmp
lrwxr-xr-x@ 1 root wheel 11 11 13 2014 /tmp -> private/tmp
➜ ls -ld /private/tmp
drwxrwxrwt 13 root wheel 442 1 18 09:07 /private/tmp
In order to solve this’sticky’ permission of /private/tmp, you need to execute the following command:
sudo chmod +t /private/tmp/
After the execution, the installation is successful:
➜ brew install pyenv
==> Downloading https://github.com/yyuu/pyenv/archive/v20160310.tar.gz
Already downloaded: /Library/Caches/Homebrew/pyenv-20160310.tar.gz
==> Caveats
To use Homebrew's directories rather than ~/.pyenv add to your profile:
export PYENV_ROOT=/usr/local/var/pyenv
To enable shims and autocompletion add to your profile:
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
==> Summary
🍺 /usr/local/Cellar/pyenv/20160310: 469 files, 2M, built in 0 seconds
Similar Posts:
- Pyenv build failed solution
- How to Solve Error using brew install opencv in MAC
- [Solved] brew update Error: “fatal: Could not resolve HEAD to a revision”
- MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl is not a valid wheel filename.
- chown: /usr/local: Operation not permitted [Solved]
- How to Solve Error Permission denied when running brew cleanup
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- Homebrew | curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- Using pyenv causes the problem that python3 cannot import SQLite3
- An error occurred while pyenv was installing python zipimport.ZipImportError : can’t decompress data; zlib not available