How To Install lp-solve on Kali Linux
Introduction
In this tutorial we learn how to install lp-solve on Kali Linux.
What is lp-solve
lp-solve is:
The linear programming (LP) problem can be formulated as: Solve A.x >= V1, with V2.x maximal. A is a matrix, x is a vector of (nonnegative) variables, V1 is a vector called the right hand side, and V2 is a vector specifying the objective function.
An integer linear programming (ILP) problem is an LP with the constraint that all the variables are integers. In a mixed integer linear programming (MILP) problem, some of the variables are integer and others are real.
The program lp_solve solves LP, ILP, and MILP problems. It is slightly more general than suggested above, in that every row of A (specifying one constraint) can have its own (in)equality, <=, >= or =. The result specifies values for all variables.
lp_solve uses the ‘Simplex’ algorithm and sparse matrix methods for pure LP problems. If one or more of the variables is declared integer, the Simplex algorithm is iterated with a branch and bound algorithm, until the desired optimal solution is found. lp_solve can read MPS format input files.
There are three methods to install lp-solve 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 lp-solve Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install lp-solve using apt-get by running the following command:
sudo apt-get -y install lp-solveInstall lp-solve Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install lp-solve using apt by running the following command:
sudo apt -y install lp-solveInstall lp-solve 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 updateAfter updating apt database, We can install lp-solve using aptitude by running the following command:
sudo aptitude -y install lp-solveHow To Uninstall lp-solve on Kali Linux
To uninstall only the lp-solve package we can use the following command:
sudo apt-get remove lp-solveUninstall lp-solve And Its Dependencies
To uninstall lp-solve and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove lp-solveRemove lp-solve Configurations and Data
To remove lp-solve configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge lp-solveRemove lp-solve configuration, data, and all of its dependencies
We can use the following command to remove lp-solve configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge lp-solveDependencies
lp-solve have the following dependencies:
References
Summary
In this tutorial we learn how to install lp-solve package on Kali Linux using different package management tools: apt, apt-get and aptitude.