Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied installing libxml2

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.

like image 858
Ryan Rich Avatar asked Jun 15 '26 09:06

Ryan Rich


1 Answers

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.

like image 54
deefour Avatar answered Jun 18 '26 00:06

deefour



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!