在本地安装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. 移动端Tap与滑屏实战技巧总结以及Vue混合开发自定义指令

    最近在忙混合开发,因交互相对复杂,所以也踩了很多坑.在此做一下总结. 1.tap事件的实际应用 在使用tap事件时,老生常谈的肯定是点透问题,大多情况下,在有滑屏交互的页面时,我们会在根节点阻止默认行 ...

  2. ReportNG报表显示中文乱码和TestNG显示中文乱码实力解决办法

    最近在进军测试自动化框架学习阶段,但无意间总是会伴随小问题的困扰,比如中文乱码,而导致显示总是不舒服,个人觉得,就一定要解决,似乎有点点强迫症.所以遇到ReportNG报表显示中文乱码和TestNG显 ...

  3. ARP和RARP协议详解

    ARP概述 为什么要用ARP?即ARP的作用 (1) TCP/IP 的32bit的IP地址,仅知道主机的IP地址不能让内核发送数据帧给主机 (2) 网络接口的硬件地址,它是一个48bit的值,用来标识 ...

  4. C# 动态事件示例

    public Form1() { InitializeComponent(); button1.Click += new EventHandler(button_Click); button2.Cli ...

  5. flask 模板block super()的讲解

    Flask强大的地方就可以引用模板,而且非常方便. 这里不得不介绍block这个概念. 模板的文件一般放在templates文件夹下,我们这里新建一个HTML文件,存放模板,'base.html' 在 ...

  6. [HNOI2011]Problem B

    Description: 给定\(a\),\(b\),\(c\),\(d\),\(k\) 求: \(\sum_{i=a}^{b} \sum_{j=c}^{d} gcd(i,j)==k\) \(T\)组 ...

  7. GitHub Desktop的简单使用

  8. 网络编程(2)—UDP

    1.UDP协议: 将数据.源.目的封装成数据包,不需要建立连接 每个数据包大小在64K一下 因无需建立连接,所以是不可靠的 发送完毕,无需释放资源,速度快 2.UDP编程步骤: 发送端: 1.创建发送 ...

  9. v$instance如何生成

    参考:http://www.itpub.net/thread-1284858-1-1.html 1.ORACLE 先创建的x$ 表即RDBMS的内部表 2.然后在X$表的基础上创建了GV$ 视图.  ...

  10. js实现的map方法

    /** * * 描述:js实现的map方法 * @returns {Map} */ function Map(){ var struct = function(key, value) { this.k ...