权限被拒绝安装libxml2 [英] Permission denied installing libxml2

查看:149
本文介绍了权限被拒绝安装libxml2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在努力更新Rails环境以支持4.0和ruby 2.0.到目前为止,我在安装libxslt时遇到了一些麻烦.在终端中运行时,我得到:

$ brew install libxml2

Error: Permission denied - /usr/local/lib/python2.7/site-packages/sitecustomize.py

我以root用户身份运行它,因此权限拒绝消息非常令人困惑.任何帮助表示赞赏.

解决方案

您不应以root身份或通过sudo将内容安装到/usr/local.从常见问题解答

为什么自制软件说sudo不好?

Homebrew设计为无需使用sudo即可工作.您可以决定使用它,但我们强烈建议您不要使用它. ...

如果运行以下命令,则可以强制将/usr/local的全部所有权强制授予登录用户

sudo chown -R `whoami` /usr/local

来源

应用后,您不应再遇到Permission Denied问题.

So I'm working on updating my rails environment to support 4.0 and ruby 2.0. So far I've had some trouble installing libxslt. When run in the terminal I get:

$ brew install libxml2

Error: Permission denied - /usr/local/lib/python2.7/site-packages/sitecustomize.py

I'm running this as a root user so the permission denied message is quite puzzling. Any help is appreciated.

解决方案

You shouldn't install things to /usr/local as root or via sudo. From the FAQ

Why does Homebrew say sudo is bad?

Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so. ...

If you run the following, you can force the ownership of /usr/local in it's entirety to your logged in user

sudo chown -R `whoami` /usr/local

Source

You should no longer get Permission Denied issues once that's been applied.

这篇关于权限被拒绝安装libxml2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆