Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

I keep getting an error when ever I try to install Jekyll.

I keep getting an error when ever I try to install Jekyll even though I am using the sudo command.

->sudo gem install jekyll ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/kramdown

rydavim
rydavim
18,813 Points

Are you by any chance using OS X El Capitan?

Yes I am using osx el captitan.

1 Answer

rydavim
rydavim
18,813 Points

These directions are assuming that you are running OS X El Capitan. If this is not the case, let me know and we can explore other solutions.

My guess is that this has to do with El Capitan's new Systems Integrity Protection.

Basically, El Capitan nerfed root access, which in turn gummed up stuff for developers. I ended up doing some research and the following steps fixed my problems with El Capitan's Systems Integrity Protection.

Disable Systems Integrity Protection:

  1. Reboot holding Cmd + R to get into recovery mode.
  2. Bring up a terminal from the dropdown menu.
  3. Run csrutil disable to disable Systems Integrity Protection.
  4. Reboot as normal and log back into OSX.

Great! Now you can go about fixing your permissions.

sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

That will fix your permissions back to what most developer utilities are expecting. It should also let you make modifications even if you turn Systems Integrity Protection back on.

You may also need to re-install the xcode developer tools.

xcode-select --install

If you want to, you can now reboot into recovery mode again and turn Systems Integrity Protection back on.

Thanks!