Skip to content

Add libyaml-dev to required packages for Debian/Ubuntu for Ruby 3.2

Achilleas Pipinellis requested to merge axil-libyaml-dev-ruby-3-2 into main

What does this merge request do and why?

Trying to install Ruby 3.2 with asdf in PopOS (Ubuntu 22.04), I got the following error:

Downloading ruby-build...
To follow progress, use 'tail -f /tmp/ruby-build.20230215100652.73896.log' or pass --verbose
Downloading ruby-3.2.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
Installing ruby-3.2.1...

BUILD FAILED (Pop 22.04 using ruby-build 20230208.1)

Inspect or clean up the working tree at /tmp/ruby-build.20230215100652.73896.v3g4MR
Results logged to /tmp/ruby-build.20230215100652.73896.log

Last 10 log lines:
make[2]: Leaving directory '/tmp/ruby-build.20230215100652.73896.v3g4MR/ruby-3.2.1'
Generating RDoc documentation
/tmp/ruby-build.20230215100652.73896.v3g4MR/ruby-3.2.1/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.
uh-oh! RDoc had a problem:
cannot load such file -- psych

run with --debug for full backtrace
make[1]: *** [uncommon.mk:598: rdoc] Error 1
make[1]: Leaving directory '/tmp/ruby-build.20230215100652.73896.v3g4MR/ruby-3.2.1'
make: *** [Makefile:88: install-asdf-dependencies] Error 1

After I installed libyaml-dev, the installation succeeded. I stumbled upon this while reviewing gitlab-docs!3519 (merged).

I also updated the Debian packages without testing it, but the package is the same https://packages.debian.org/search?keywords=libyaml-dev.

How to set up and validate locally

  1. Install Ubuntu 22.04.
  2. Install GDK.
  3. Update .tool-versions and include Ruby 3.2.1.
  4. Install the new Ruby with asdf install ruby 3.2.1 and see it failing.
  5. Check out to this merge request's branch.
  6. Install the new Ruby with asdf install ruby 3.2.1 and see it succeeding.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Achilleas Pipinellis

Merge request reports