在本地安装pyenv的时候,出现了如下的报错:

➜   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>'

解决方法:

先查看自己本机 /private/tmp 的文件夹的读写权限,在我的mac机器上如下:

➜  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

为了解决这个 'sticky' permission of /private/tmp ,需要执行如下的命令:

sudo chmod +t /private/tmp/

执行完之后,再安装就成功了:

➜  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

Error: parent directory is world writable but not sticky的更多相关文章

  1. mac brew 安装php扩展报错:parent directory is world writable but not sticky

    $ brew install php70-mcrypt 报错: Error: parent directory is world writable but not sticky 搜索到github的答 ...

  2. Magento Error – The directory is not writable by server.

    When trying to use the insert image functionality in Magento if you receive an error saying: “The di ...

  3. Docker: adding a file from a parent directory

    17down votefavorite 4 In my Dockerfile I've got : ADD ../../myapp.war /opt/tomcat7/webapps/ That fil ...

  4. [macOS] Error: /usr/local must be writable!" (Sierra 10.12 )

    Error: /usr/local must be writable!" (Sierra 10.12 ) solution: sudo chown -R $(whoami) /usr/loc ...

  5. The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If execu

    使用sudo pip install ......的时候出现下面一段黄色的代码: The directory '/home/stone/.cache/pip/http' or its parent d ...

  6. hive报错:Caused by: ERROR XBM0H: Directory /var/lib/hive/metastore/metastore_db cannot be created.

    在cdh集群中,删除之前的hive服务,然后将hive添加到其他节点,然后再通过hive客户端连接hive报错: Caused by: ERROR XJ041: Failed to create da ...

  7. go.mod file not found in current directory or any parent directory; see 'go help modules'

    go的环境设置问题,执行 go env -w GO111MODULE=auto 我的环境:Windows 7, Go 1.17 D:\Apps\GOPATH\src\code.oldboyedu.co ...

  8. AndroidStudio更新时报错:Connection Error,Temp directory inside installation

    场景 在将Android Studio的 .AndroidStudio目录修改为别的目录后,打开AS,提示更新,点击更新后提示: Connection Error,Temp directory ins ...

  9. "The /usr/local directory is not writable."解决方法

    sudo chown -R $(whoami) /usr/local brew prune

随机推荐

  1. 提取IPv6地址的编码信息

    提取IPv6地址的编码信息   为了保持兼容和地址转化,很多IPv6地址将额外的信息编码到地址信息中,如IPv4地址和Mac地址.在Nmap中,可以使用address-info脚本提取内嵌的信息,并进 ...

  2. BZOJ2366 : 多重历史

    建立AC自动机,因为不存在某个串是另一个串的后缀,因此匹配到任意位置都只可能匹配一个串. 预处理出每个串出现的所有位置,总的出现次数为$O(m)$. 设$f[i][j]$表示考虑了前$i$个串,最后一 ...

  3. webstorm激活方法

    安装完成后,打开 WebStorm, 在打开的 License Activation 窗口中选择第三个选项: License server. 在输入框输入网址即可 最新网址: https://s.tu ...

  4. ie6定位absolute bug触发layout解决

    IE6中很多Bug都可以通过触发layout得到解决,以上的解决方法无论是设置zoom:1还是设置width和height其实都是为了触发layout.下列的CSS属性或取值会让一个元素获得layou ...

  5. 各种组件的js 获取值 / js动态赋值

    jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...});   //为Se ...

  6. 调用 微信接口报错 {"errcode":48001,"errmsg":"api unauthorized, hints: [ req_id: 1QoCla0699ns81 ]"}

    如下截图,仅为备份,本文转载地址: http://www.cnblogs.com/liaolongjun/p/6080240.html 以下正文↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ ...

  7. 关于在win8系统下用VMware 9.0装系统导致物理机不断重启的解决办法

    一.问题描述 前段时间将操作系统换成了Win8,安装上VMware 9.0英文版.然后在VMware中安装centos系统,结果每次到安装系统的时候,物理机系统就会莫名其妙地自动重启,毫无征兆地出现, ...

  8. [Python] 糗事百科文本数据的抓取

    [Python] 糗事百科文本数据的抓取 源码 https://github.com/YouXianMing/QiuShiBaiKeText import sqlite3 import time im ...

  9. 奇怪吸引子---Qi

    奇怪吸引子是混沌学的重要组成理论,用于演化过程的终极状态,具有如下特征:终极性.稳定性.吸引性.吸引子是一个数学概念,描写运动的收敛类型.它是指这样的一个集合,当时间趋于无穷大时,在任何一个有界集上出 ...

  10. [数据结构与算法分析(Mark Allen Weiss)]二叉树的插入与删除 @ Python

    二叉树的插入与删除,来自Mark Allen Weiss的<数据结构与算法分析>. # Definition for a binary tree node class TreeNode: ...