Created
March 9, 2015 15:25
-
-
Save bahamas10/6a052faa8644d3d462d5 to your computer and use it in GitHub Desktop.
install isolated ruby and chef on smartos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(as root) | |
mkdir ~/src | |
cd ~/src | |
# install ruby | |
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz | |
tar xf ruby-2.2.1.tar.gz | |
cd ruby-2.2.1 | |
./configure --prefix=/opt/chef --with-opt-dir=/opt/local --enable-shared ac_cv_func_dl_iterate_phdr=no CFLAGS="-R -fPIC" rb_cv_have_signbit=no --disable-install-doc | |
make -j 8 | |
mkdir /opt/chef | |
make install | |
# install chef | |
/opt/chef/bin/gem install --no-ri --no-rdoc chef -v 12.1.0 | |
# FAIL! now we fix ffi | |
cd ~/src | |
curl -o ffi.patch https://github.com/ffi/ffi/pull/399.diff | |
/opt/chef/bin/gem install gem-patch | |
/opt/chef/bin/gem patch /opt/chef/lib/ruby/gems/2.2.0/cache/ffi-1.9.6.gem ./ffi.patch -p 1 | |
# retry chef install, this time it should work | |
/opt/chef/bin/gem install --no-ri --no-rdoc chef -v 12.1.0 | |
# done, /opt/chef/bin has every executable needed by chef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for raspberry pi