Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I run this command it fails:

sudo echo '/usr/local/lib' >> /etc/ld.so.conf 
bash: /etc/ld.so.conf: Permission denied

I don't have any problem running sudo for other tasks. I am using Ubuntu 12.04. It works when connected as root.

Any help will be much appreciated

share|improve this question
3  
You do a sudo echo but the remainder of that command is NOT executed as sudo (the rerouting is not done as sudo ;-) ) –  Rinzwind Apr 10 '13 at 10:18

1 Answer 1

up vote 7 down vote accepted

From memory this should do it:

sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.