mold command not found

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

Introduction

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

mold: command not found

or when using sudo you get the following error message

sudo: mold: command not found

Solutions to mold: command not found

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

In Ubuntu mold is provided by mold package.

mold is:

mold is a faster drop-in replacement for existing Unix linkers. It is several times faster than LLVM lld linker mold is created for increasing developer productivity by reducing build time especially in rapid debug-edit-rebuild cycles.

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

sudo apt-get -y install mold

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

You can also use apt command to install mold.

sudo apt -y install mold

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

sudo aptitude install mold

Summary

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