sox command not found

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

Introduction

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

sox: command not found

or when using sudo you get the following error message

sudo: sox: command not found

Solutions to sox: command not found

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

In Ubuntu sox is provided by sox package.

sox is:

SoX is a command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files during the conversion. As an added bonus, SoX can play and record audio files on several unix-style platforms.

SoX is able to handle formats like Ogg Vorbis, MP3, WAV, AIFF, VOC, SND, AU, GSM and several more. Any format support requires at least libsox-fmt-base. Some formats have their own package e.g. mp3 read and write support is provided by libsox-fmt-mp3.

SoX supports most common sound architectures i.e. Alsa, Libao, OSS and Pulse (respectively provided by libsox-fmt-alsa, libsox-fmt-ao, libsox-fmt-oss and libsox-fmt-pulse). It also supports LADSPA plugins.

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

sudo apt-get -y install sox

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

You can also use apt command to install sox.

sudo apt -y install sox

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

sudo aptitude install sox

Summary

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