How To Install libglpk40 on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libglpk40
on Ubuntu 20.04.
What is libglpk40
libglpk40 is:
GLPK (GNU Linear Programming Kit) is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.
GLPK supports the GNU MathProg language, which is a subset of the AMPL language. GLPK also supports the standard MPS and LP formats.
The GLPK package includes the following main components: * Revised simplex method. * Primal-dual interior point method. * Branch-and-bound method. * Translator for GNU MathProg modeling language. * Application program interface (API).
In order to get connections between the internal MathProg model objects and external database tables, please install the libiodbc2-dev (for the iODBC table driver) and libmysqlclient-dev (for the MySQL table driver).
There are three methods to install libglpk40
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libglpk40 Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libglpk40
using apt-get
by running the following command:
sudo apt-get -y install libglpk40
Install libglpk40 Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libglpk40
using apt
by running the following command:
sudo apt -y install libglpk40
Install libglpk40 Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libglpk40
using aptitude
by running the following command:
sudo aptitude -y install libglpk40
How To Uninstall libglpk40 on Ubuntu 20.04
To uninstall only the libglpk40
package we can use the following command:
sudo apt-get remove libglpk40
Uninstall libglpk40 And Its Dependencies
To uninstall libglpk40
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libglpk40
Remove libglpk40 Configurations and Data
To remove libglpk40
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libglpk40
Remove libglpk40 configuration, data, and all of its dependencies
We can use the following command to remove libglpk40
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libglpk40
References
Summary
In this tutorial we learn how to install libglpk40
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.