lp_solve command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
lp_solve: command not found
or when using sudo you get the following error message
sudo: lp_solve: command not found
Solutions to lp_solve: command not found
How To Fix lp_solve: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu lp_solve is provided by lp-solve package.
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.
To fix this problem, we can install more using the command below.
sudo apt-get -y install lp-solve
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install lp-solve.
sudo apt -y install lp-solve
Or if you have aptitude installed you can use the following command.
sudo aptitude install lp-solve
Summary
In this tutorial we learn how to fix lp_solve command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.