3

I am trying to install latest of ruby through RVM. I could not install install as it requires libyaml-devel and libffi-dev. When ever i try to install them i get error that no package found

[root@dev workspace]# rvm requirements
Checking requirements for redhat.
Enabling optional repository
Username: ^C
User interrupted process.

Installing requirements for redhat.
Installing required packages: libyaml-devel, libffi-devel..
Error running 'requirements_centos_libs_install libyaml-devel libffi-devel',
showing last 15 lines of /usr/local/rvm/log/1467891146/package_install_libyaml-devel_libffi-devel.log
+ __rvm_try_sudo yum install -y libyaml-devel libffi-devel
+ typeset -a command_to_run
+ typeset sudo_path sbin_path missing_paths
+ command_to_run=("$@")
+ ((  UID == 0  ))
+ yum install -y libyaml-devel libffi-devel
Failed to set locale, defaulting to C
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Setting up Install Process

No package libyaml-devel available.
No package libffi-devel available.
Error: Nothing to do
+ return 1
+ return 1
syed imty
  • 133
  • 1
  • 4

4 Answers4

6

libyaml-devel and libffi-devel are provided by CentOS 8's PowerTools-repository which is disabled by default.

So a simple yum --enablerepo=powertools install libyaml-devel libffi-devel should do the trick.

(Maybe this has not been the case when the other answers were posted.)

  • This gave me an error: Error: Unknown repo: 'PowerTools'. But it worked AFTER I enabled Powertools repo by following instructions in another article and just running yum install libyaml-devel libffi-devel – Augusto Samamé Barrientos Mar 09 '21 at 17:58
  • You need to specify the repo's name as it is defined in the file `/etc/yum.repos.d/CentOS-Linux-PowerTools.repo`. I fixed the command to use `powertools` instead of `PowerTools`. – Michael Trojanek Mar 10 '21 at 18:44
  • Thanks. Simply replace `yum` with `dnf` worked on my CentOS 8 Stream. – Til May 15 '23 at 13:26
2

You're not running CentOS. You're running RHEL6 with no subscription. Contact your sysadmin to get a subscription added, and you'll be able to add packages. I would NOT suggest that you install CentOS packages from some random FTP server addressed by IP. You have no idea what you're getting, and you aren't checking the RPM GPG signature either.

If you meant to install CentOS, perhaps you should reinstall the system from the CentOS media.

jsbillings
  • 24,006
  • 6
  • 56
  • 58
1

For RHEL6 both are found in the "rhel-6-server-optional-rpms" repository, I don't not advice using unknown RPM sources like "jsbillings" mentioned.

subscription-manager repos --enable rhel-6-server-optional-rpms
0

Finally installed both libyaml-devel and libffi-devel by downloading their RPM's manually and installing them.

You can find the rpm's here

I ran the following commands, to download the rpms

curl ftp://195.220.108.108/linux/centos/6.8/os/x86_64/Packages/libyaml-devel-0.1.3-4.el6_6.x86_64.rpm --output libyaml-devel-0.1.3-4.el6_6.x86_64.rpm
curl ftp://195.220.108.108/linux/centos/6.8/os/x86_64/Packages/libffi-devel-3.0.5-3.2.el6.x86_64.rpm --output libffi-devel-3.0.5-3.2.el6.x86_64.rpm

Then installed them using

sudo rpm -Uvh libyaml-devel-0.1.3-11.16.1.x86_64.rpm
sudo rpm -Uvh libffi-devel-3.0.5-3.2.el6.x86_64.rpm
syed imty
  • 133
  • 1
  • 4
  • Don't do that, unless you *carefully* check the stuff you are installing. It might be/contain malware, don't work well together with what you have/future updates, have unpatched vulnerabilities, ... – vonbrand Feb 12 '20 at 17:52