Libyaml Installed but Not Found

I need to install some Ruby gems that depend on libyaml. It’s installed but it cannot be found for some reason.

LD_LIBRARY_PATH=.:/home/user3/.rbenv/versions/3.1.2/lib pkg-config --exists yaml-0.1
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no

How can I get this installed? I’ve tried and this is what I get:

Package libyaml-0.2.5-7.el9.x86_64 is already installed.

it’ll be looking for libyaml-devel in that case

Doesn’t seem to like that.

[Fri Apr 21 11:37:54 user3@server_d ~] yum search libyaml-devel
Last metadata expiration check: 1:52:00 ago on Fri Apr 21 09:46:04 2023.
========================================================== Name Matched: libyaml-devel ==========================================================
ghc-libyaml-devel.x86_64 : Haskell libyaml library development files
[Fri Apr 21 11:38:04 user3@server_d ~] sudo yum install ghc-libyaml-devel -y
Last metadata expiration check: 0:43:42 ago on Fri Apr 21 10:54:35 2023.
Error:
 Problem: conflicting requests
  - nothing provides libyaml-devel(x86-64) needed by ghc-libyaml-devel-0.1.1.0-13.el9.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

that’s the wrong package, the one you want is in the CodeReadyBuilder repo, this works:

sudo dnf --enablerepo=crb install libyaml-devel