Skip to content

Instantly share code, notes, and snippets.

@sdondley
Forked from lifofernandez/osx_elcapitan_fix.md
Last active February 21, 2017 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdondley/6e83b5cc07e72c8be0d91b03663d5eaa to your computer and use it in GitHub Desktop.
Save sdondley/6e83b5cc07e72c8be0d91b03663d5eaa to your computer and use it in GitHub Desktop.
CPAN fix "Do not have write permissions on '/usr/bin'" OSX El Capitan problem

CPAN log

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/bin'
Do not have write permissions on '/usr/bin'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

There may be a problem upgrading the CPAN module in Mac OS X El Capitan and Sierra releases. Solution: http://www.perlmonks.org/?node_id=1144321

Aperently in these OSX versions, applications can not whrite on /usr with temporary sudoer rights.

Start CPAN interactive shell

$ cpan

Change CPAN configuration

cpan> o conf makepl_arg "INSTALLBIN=/usr/local/bin INSTALLSCRIPT=/usr/local/bin"

Save changes

cpan> o conf commit

Quit CPAN interactive shell

cpan> quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment