Skip to content

Instantly share code, notes, and snippets.

@mattantonelli
Created July 21, 2023 14:43
Show Gist options
  • Save mattantonelli/13292c6c5e352805ae3726fec51f5dfe to your computer and use it in GitHub Desktop.
Save mattantonelli/13292c6c5e352805ae3726fec51f5dfe to your computer and use it in GitHub Desktop.
Install Ruby 3.2.2 on CentOS 7
# Resolves the following error which occurs when Ruby does not like our GCC version:
#
# vm_core.h:1865:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
# rb_execution_context_t *ec = ruby_current_ec;
#
# Install the Developer Toolset 7 package to obtain a more current version of GCC
sudo yum install centos-release-scl
sudo yum install devtoolset-7
# Re-run the rbenv install with the new GCC
CC=/opt/rh/devtoolset-7/root/usr/bin/gcc rbenv install 3.2.2 -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment