How To Install libfl2 on Kali Linux

In this tutorial we learn how to install libfl2 on Kali Linux. libfl2 is SHARED library for flex (a fast lexical analyzer generator)

Introduction

In this tutorial we learn how to install libfl2 on Kali Linux.

What is libfl2

libfl2 is:

Flex is a tool for generating scanners: programs which recognized lexical patterns in text. It reads the given input files for a description of a scanner to generate. The description is in the form of pairs of regular expressions and C code, called rules. Flex generates as output a C source file, lex.yy.c, which defines a routine yylex(). This file is compiled and linked with the -lfl library to produce an executable. When the executable is run, it analyzes its input for occurrences of the regular expressions. Whenever it finds one, it executes the corresponding C code.

This package contains the shared library for flex.

There are three methods to install libfl2 on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libfl2 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libfl2 using apt-get by running the following command:

sudo apt-get -y install libfl2

Install libfl2 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libfl2 using apt by running the following command:

sudo apt -y install libfl2

Install libfl2 Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libfl2 using aptitude by running the following command:

sudo aptitude -y install libfl2

How To Uninstall libfl2 on Kali Linux

To uninstall only the libfl2 package we can use the following command:

sudo apt-get remove libfl2

Uninstall libfl2 And Its Dependencies

To uninstall libfl2 and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove libfl2

Remove libfl2 Configurations and Data

To remove libfl2 configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge libfl2

Remove libfl2 configuration, data, and all of its dependencies

We can use the following command to remove libfl2 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libfl2

Dependencies

libfl2 have the following dependencies:

References

Summary

In this tutorial we learn how to install libfl2 package on Kali Linux using different package management tools: apt, apt-get and aptitude.