cargo-lock command not found

In this troubleshooting guide we learn how to fix cargo-lock command not found error message

Introduction

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

cargo-lock: command not found

or when using sudo you get the following error message

sudo: cargo-lock: command not found

Solutions to cargo-lock: command not found

How To Fix cargo-lock: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu cargo-lock is provided by cargo-lock package.

cargo-lock is:

This package contains the following binaries built from the Rust crate “cargo-lock”:

  • cargo-lock

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

sudo apt-get -y install cargo-lock

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

You can also use apt command to install cargo-lock.

sudo apt -y install cargo-lock

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

sudo aptitude install cargo-lock

Summary

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