问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/17310942/permission-denied-installing-libxml2