facter command not found

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

Introduction

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

facter: command not found

or when using sudo you get the following error message

sudo: facter: command not found

Solutions to facter: command not found

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

In Ubuntu facter is provided by facter package.

facter is:

Facter is Puppet’s cross-platform system profiling library. It discovers and reports per-node facts, which are collected by the Puppet agent and are made available in Puppet manifests as variables. Facter comes with a number of built-in facts providing information about the operating system, hardware, SSH keys, etc., but is also easily extensible through the following interfaces:

  • Through custom facts using Facter’s Ruby API.
  • Through `external’ facts which can be either executables, or static data files.

This package contains the facter binary and the ruby module making facter available to Puppet.

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

sudo apt-get -y install facter

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

You can also use apt command to install facter.

sudo apt -y install facter

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

sudo aptitude install facter

Summary

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