I got error message when installing ruby 2.3.1 using rbenv. My environment is below.
The log message is below.
$ rbenv install 2.3.1
...
Last 10 log lines:
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
linking miniruby
generating encdb.h
make: ./miniruby: Permission denied
make: ./miniruby: Permission denied
make: *** [.rbconfig.time] Error 1
make: *** Waiting for unfinished jobs....
make: *** [encdb.h] Error 1
If you get the same error, would you please tell me how to solve this error?
Thank you for your help.
Accepted answer is not a good answer - the install process should not require root privileges, and may lead to problems installing gems that require C extensions in the future (nokogiri is a good example).
It's a documented bug in the ruby-build
package: https://github.com/rbenv/ruby-build/issues/992, the workaround is to navigate into the working directory and run make install
yourself - which should run if you have XCode command line tools installed and updated.