How To Install minizinc on Ubuntu 18.04
Introduction
In this tutorial we learn how to install minizinc
on Ubuntu 18.04.
What is minizinc
minizinc is:
MiniZinc is a medium-level constraint modelling language. It is high-level enough to express most constraint problems easily, but low-level enough that it can be mapped onto existing solvers easily and consistently. It is a subset of the higher-level language Zinc.
MiniZinc is designed to interface easily to different backend solvers. It does this by transforming an input MiniZinc model and data file into a FlatZinc model. FlatZinc models consist of variable declaration and constraint definitions as well as a definition of the objective function if the problem is an optimization problem. The translation from MiniZinc to FlatZinc is specializable to individual backend solvers, so they can control what form constraints end up in. In particular, MiniZinc allows the specification of global constraints by decomposition.
There are three methods to install minizinc
on Ubuntu 18.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 minizinc Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install minizinc
using apt-get
by running the following command:
sudo apt-get -y install minizinc
Install minizinc Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install minizinc
using apt
by running the following command:
sudo apt -y install minizinc
Install minizinc 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 minizinc
using aptitude
by running the following command:
sudo aptitude -y install minizinc
How To Uninstall minizinc on Ubuntu 18.04
To uninstall only the minizinc
package we can use the following command:
sudo apt-get remove minizinc
Uninstall minizinc And Its Dependencies
To uninstall minizinc
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove minizinc
Remove minizinc Configurations and Data
To remove minizinc
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge minizinc
Remove minizinc configuration, data, and all of its dependencies
We can use the following command to remove minizinc
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge minizinc
References
Summary
In this tutorial we learn how to install minizinc
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.