How To Install rubygem-ffi on CentOS 8
Introduction
In this tutorial we learn how to install rubygem-ffi
on CentOS 8.
What is rubygem-ffi
Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling those functions from Ruby code. Moreover, a Ruby-FFI extension works without changes on Ruby and JRuby. Discover why should you write your next extension using Ruby-FFI here[http
We can use yum
or dnf
to install rubygem-ffi
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install rubygem-ffi.
Install rubygem-ffi on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install rubygem-ffi
using dnf
by running the following command:
sudo dnf -y install rubygem-ffi
Install rubygem-ffi on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install rubygem-ffi
using yum
by running the following command:
sudo yum -y install rubygem-ffi
How To Uninstall rubygem-ffi on CentOS 8
To uninstall only the rubygem-ffi
package we can use the following command:
sudo dnf remove rubygem-ffi
rubygem-ffi Package Contents on CentOS 8
/usr/lib/.build-id
/usr/lib/.build-id/56
/usr/lib/.build-id/56/ff9e1809e7ea2252fe211f17ca775e68a4f28c
/usr/lib64/gems/ruby/ffi-1.10.0
/usr/lib64/gems/ruby/ffi-1.10.0/ffi_c.so
/usr/lib64/gems/ruby/ffi-1.10.0/gem.build_complete
/usr/share/gems/gems/ffi-1.10.0
/usr/share/gems/gems/ffi-1.10.0/COPYING
/usr/share/gems/gems/ffi-1.10.0/LICENSE
/usr/share/gems/gems/ffi-1.10.0/LICENSE.SPECS
/usr/share/gems/gems/ffi-1.10.0/lib
/usr/share/gems/gems/ffi-1.10.0/lib/ffi
/usr/share/gems/gems/ffi-1.10.0/lib/ffi.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/autopointer.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/buffer.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/callback.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/enum.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/errno.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/ffi.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/io.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/library.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/managedstruct.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/memorypointer.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-freebsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-freebsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-freebsd12
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-freebsd12/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/aarch64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-freebsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-freebsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-freebsd12
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-freebsd12/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/arm-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-cygwin
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-cygwin/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-darwin
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-darwin/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-freebsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-freebsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-freebsd12
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-freebsd12/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-gnu
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-gnu/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-netbsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-netbsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-openbsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-openbsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-solaris
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-solaris/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-windows
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/i386-windows/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/ia64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/ia64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips64el-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mips64el-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsel-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsel-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa32r6-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa32r6-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa32r6el-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa32r6el-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa64r6-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa64r6-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa64r6el-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/mipsisa64r6el-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-aix
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-aix/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-darwin
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-darwin/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/powerpc64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/s390-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/s390-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/s390x-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/s390x-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc-solaris
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc-solaris/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparc64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparcv9-solaris
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/sparcv9-solaris/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-cygwin
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-cygwin/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-darwin
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-darwin/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-freebsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-freebsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-freebsd12
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-freebsd12/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-linux
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-linux/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-netbsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-netbsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-openbsd
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-openbsd/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-solaris
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-solaris/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-windows
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/platform/x86_64-windows/types.conf
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/pointer.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/struct.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/struct_layout_builder.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools/const_generator.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools/generator.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools/generator_task.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools/struct_generator.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/tools/types_generator.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/types.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/union.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/variadic.rb
/usr/share/gems/gems/ffi-1.10.0/lib/ffi/version.rb
/usr/share/gems/specifications/ffi-1.10.0.gemspec
References
Summary
In this tutorial we learn how to install rubygem-ffi
on CentOS 8 using yum and dnf.