I'm getting this error when I attempt to install a Ruby version:
# rbenv install 2.0.0-p247
ruby-build: TMPDIR=/tmp cannot hold executables (partition possibly mounted with `noexec`)
# git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# rbenv -v
rbenv 0.4.0-129-g7e0e85b
# uname -a
Linux sebert.accountservergroup.com 3.14.25-grsec.3.el5 #1 SMP Mon Jan 5 14:23:02 GMT 2015 x86_64 x86_64 x86_64 GNU/Linux
# lsb_release -r -i -c -d
Distributor ID: CentOS
Description: CentOS release 5.11 (Final)
Release: 5.11
Codename: Final
How do I fix this?
Me too with jenkins build. Our server builds have /tmp mounted noexec (lvm volume).
Maybe can set TMPDIR ?
See README.md
You can set certain environment variables to control the build process.
TMPDIR sets the location where ruby-build stores temporary files.
You can set TMPDIR to another location that's not mounted as noexec and that will either be cleaned up automatically by the system or that you will clean up manually.
I hope that our comments above answered your question.
In the Chef cookbook, just before the rbenv_ruby LWRP, use:
ENV['TMPDIR'] = '/any/other/tmp/'
For future truth seekers, I got this error because I was on a remote server on a user group with limited permissions. I fixed by adding this to bash_profile: export TMPDIR="path to any other tmp folder"
sudo mount -o remount,exec /tmp
note: probably means you have noexec set in your /etc/fstab. So be sure to change that to exec (Hopefully isn't a terrible security concern).
Most helpful comment
sudo mount -o remount,exec /tmp