Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install gnuplot on my mac. after trying brew install gnuplot, I get the following errors:

You must 'brew link lua jpeg' before gnuplot can be installed

And when I try brew link lua jpeg I get the following error:

Could not symlink file: /usr/local/Cellar/lua/5.1.4/include/lualib.h /usr/local/include is not writable. You should change its permissions.

Any suggestion? BTW, my XCode and brew are updated.

share|improve this question

migrated from Nov 8 '12 at 7:39

This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

Let's see if someone knows an answer offhand, but if you would edit this to add the version of Xcode and OS X it works much better - current versions are very localized but questions about a specific combination can be very useful even a year or two down the road. – bmike Nov 8 '12 at 18:19
Sounds like /usr/local wasn't set up with the user you're using to install Homebrew with. What user are you running brew as, and what's the output of ls -ld /usr/local /usr/local/include? – Andrew Janke Apr 25 '13 at 19:15
sudo chown $(whoami) /usr/local/include
chmod +w /usr/local/include
brew link lua
share|improve this answer

Your Answer


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.