How To Install ElectricFence.x86_64 on Amazon Linux 2

In this tutorial we learn how to install ElectricFence.x86_64 in Amazon Linux 2. ElectricFence.x86_64 is A debugger which detects memory allocation violations

Introduction

In this tutorial we learn how to install ElectricFence.x86_64 on Amazon Linux 2.

What is ElectricFence.x86_64

ElectricFence is a utility for C programming and debugging. ElectricFence uses the virtual memory hardware of your system to detect when software overruns malloc() buffer boundaries, and/or to detect any accesses of memory released by free(). ElectricFence will then stop the program on the first instruction that caused a bounds violation and you can use your favorite debugger to display the offending statement. Install ElectricFence if you need a debugger to find malloc() violations.

We can use yum to install ElectricFence.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install ElectricFence.x86_64.

Install ElectricFence.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install ElectricFence.x86_64 using yum by running the following command:

sudo yum -y install ElectricFence.x86_64

How To Uninstall ElectricFence.x86_64 on Amazon Linux 2

To uninstall only the ElectricFence.x86_64 package we can use the following command:

sudo yum remove ElectricFence.x86_64

ElectricFence.x86_64 Package Contents on Amazon Linux 2

/usr/bin/ef
/usr/lib64/libefence.a
/usr/lib64/libefence.so
/usr/lib64/libefence.so.0
/usr/lib64/libefence.so.0.0
/usr/share/doc/ElectricFence-2.2.2
/usr/share/doc/ElectricFence-2.2.2/CHANGES
/usr/share/doc/ElectricFence-2.2.2/COPYING
/usr/share/doc/ElectricFence-2.2.2/README
/usr/share/man/man1/ef.1.gz
/usr/share/man/man3/efence.3.gz
/usr/share/man/man3/libefence.3.gz

References

Summary

In this tutorial we learn how to install ElectricFence.x86_64 on Amazon Linux 2 using yum.