minizinc command not found

In this troubleshooting guide we learn how to fix minizinc command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

minizinc: command not found

or when using sudo you get the following error message

sudo: minizinc: command not found

Solutions to minizinc: command not found

How To Fix minizinc: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu minizinc is provided by minizinc package.

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.

To fix this problem, we can install more using the command below.

sudo apt-get -y install minizinc

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install minizinc.

sudo apt -y install minizinc

Or if you have aptitude installed you can use the following command.

sudo aptitude install minizinc

Summary

In this tutorial we learn how to fix minizinc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.