With the abundance of package managers and containers, it seems like very few people now compile anything. Putting this out there for any colleagues stumbling with compiling on Ruby.
If you need to compile the latest Ruby on Ubuntu / Debian-based systems, and in this case Ruby 3.3.6, and you encounter strange build errors like:
/root/ruby-3.3.6/lib/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Or a similar need for openssl
, zlib
, or fiddle
while compiling, besides build-essential
, you should also install the required headers for these packages by:
apt install -y libyaml-dev libffi-dev libssl-dev zlib1g-dev
Then clean up your previous makefiles and simply re-compile by:
make clean && ./configure && make && make install