Reputation: 688
Ubuntu 20.04. Trying to install Ruby 3.2.2 I get the following error:
/tmp/ruby-build.20230911110842.25159.uzwoaP/ruby-3.2.2/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.
So I go on and run:
sudo apt-get update
sudo apt-get install libyaml
But I get the following output:
E: Unable to locate package libyaml
What's wrong?
Upvotes: 4
Views: 3165
Reputation: 1386
The error message suggests that the package libyaml
is not available in the Ubuntu repositories, which is why apt-get is unable to locate it. However, the package you're looking for is actually named libyaml-dev
.
You can install it using the following command:
sudo apt-get install libyaml-dev
After installing libyaml-dev
, you should reinstall Ruby. If you're using rbenv
and ruby-build
, you can do this with the following command:
rbenv install 3.2.2
This should be it.
Upvotes: 4
Reputation: 1
Indeed, it seems that there's no package named libyaml
on Ubuntu 20.04.
Some packages that might possibly solve your dependency:
libyaml-libyaml-perl
(original implementation afaik)libyaml-0-2
(faster C++ implementation)Upvotes: 0