在本地安装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. bzoj3693: 圆桌会议 二分图 hall定理

    目录 题目链接 题解 代码 题目链接 bzoj3693: 圆桌会议 题解 对与每个人构建二分,问题化为时候有一个匹配取了所有的人 Hall定理--对于任意的二分图G,G的两个部分为X={x1,x2,- ...

  2. [POI2011]Rotacje na drzewie (2)/[BZOJ3702]二叉树

    [POI2011]Rotacje na drzewie (2) 题目大意: 一棵有\(n\)个叶子结点的二叉树,每个叶子结点有一个权值,恰好是\(1\sim n\)的一个排列,你可以任意交换每一对子结 ...

  3. java读取数据,2,2,1方式读取

    /*   * for(int i=0;i<15;)   * { for(int j=0;j<5;j++,i++)   *    {    *      if(j%2==0&& ...

  4. IE6条件下的bug与常见的bug及其解决方法

    1.IE6条件下有双倍的margin 解决办法:给这个浮动元素增加display:inline属性 2. 图片底部有3像素问题 解决办法:display:block;或者vertical-align: ...

  5. 响应式 Web 设计指南「基础篇」

    Web 是普遍存在的,也是无处不在的,Web可以适应任何尺寸的屏幕以及任何使用环境,因为Web有其固有的灵活性和可塑性. Web 再也不是某一平台独有的矿藏,而是真正成为了一张名副其实的大网,并将各种 ...

  6. Ping监控脚本

    需求 内网服务器之间高频率检验延时信息, 脚本特点 多进程,可同时异步监控多个地址,不会互相影响. 使用方式 创建文件夹(可以替换为你自己的,我这里就用我们生产环境的标准目录了) mkdir /dat ...

  7. Chrome上网问题解决记录

    浏览器打开网站缓慢,甚至等待很久后直接烂页面 注意观察浏览器左下角会显示: 正在建立安全连接... 环境: 操作系统:Win10 Chrome版本: 69.x 解决办法:http://bbs.360. ...

  8. nohup和disown

    Many system administrators make a practice of using GNU Screen or tmux to manage jobs running in the ...

  9. [Android Pro] 完美解决 No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    原文:https://blog.csdn.net/qq_24118527/article/details/82867864

  10. WPF 使用HttpListener搭建本地web服务器

    准备工作 using Micro.Listener 类(Micro.Listener.dll)下载 调用示例:一.启动服务:new Micro.Listener.ListenerSync(8080). ...