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.

  • 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, 2012 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? Apr 25, 2013 at 19:15

1 Answer 1

sudo chown $(whoami) /usr/local/include
chmod +w /usr/local/include
brew link lua

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .