'What's the easiest way to fix a libyaml version mismatch between Mac (0.2.5) and Debian (0.2.1)?

I am running Debian 10 (Buster) on my servers and CI builds. I am running MacOS Big Sur 11.6.4 on my MacBook Pro. I am developing a Ruby on Rails application.

My Debian servers are running libyaml 0.2.1. My Mac is running libyaml 0.2.5. (I ran puts YAML.libyaml_version in Ruby.)

libyaml 0.2.1 has a trailing whitespace bug that was fixed in 0.2.5. This is causing a CI build failure since I have a job that checks the formatting of a YAML file (i18n-tasks normalize.) When I run i18n-tasks normalize, the i18n YAML files are formatted differently on my Mac vs the Debian linux container.

What would be the easiest solution? Either:

  • Downgrade my brew installation of libyaml to 0.2.1
  • Upgrade my Debian installation of libyaml to 0.2.5

Either one works, just so that my Mac development environment is consistent with my CI builds and servers. (I don't actually care about the trailing whitespace bug as long as it's consistent for both development and CI.)

I can't find an easy method for either option. Is there a libyaml 0.2.5 debian package (.deb file) that I can just download and install?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source