fzn-gecode command not found

In this troubleshooting guide we learn how to fix fzn-gecode command not found error message

Introduction

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

fzn-gecode: command not found

or when using sudo you get the following error message

sudo: fzn-gecode: command not found

Solutions to fzn-gecode: command not found

How To Fix fzn-gecode: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu fzn-gecode is provided by flatzinc package.

flatzinc is:

FlatZinc is a low-level modelling language for constraint problems. It is designed to be easily interfaceable to constraint solvers (like Gecode). For more information on FlatZinc, please refer to the MiniZinc pages of the G12 project https://www.minizinc.org/.

The FlatZinc interpreter that ships with Gecode supports the FlatZinc language and MiniZinc global constraint definitions of MiniZinc version 1.6.0.

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

sudo apt-get -y install flatzinc

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

You can also use apt command to install flatzinc.

sudo apt -y install flatzinc

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

sudo aptitude install flatzinc

Summary

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