safe_yaml command not found

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

Introduction

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

safe_yaml: command not found

or when using sudo you get the following error message

sudo: safe_yaml: command not found

Solutions to safe_yaml: command not found

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

In Ubuntu safe_yaml is provided by ruby-safe-yaml package.

ruby-safe-yaml is:

SafeYAML provides an alternative implementation of YAML.load suitable for accepting user input in Ruby applications.

Unlike Ruby’s built-in implementation of YAML.load, SafeYAML’s version does not expose applications to arbitrary code execution exploits.

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

sudo apt-get -y install ruby-safe-yaml

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

You can also use apt command to install ruby-safe-yaml.

sudo apt -y install ruby-safe-yaml

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

sudo aptitude install ruby-safe-yaml

Summary

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