Installing “SoX” (Sound eXchange) via the Terminal in Mac OS X
Matthew Harrington
I’m new to installing applications via the “Terminal,” so excuse my absolute ignorance on the subject.
I want to install SoX (Sound eXchange), so I can do some ninja audio editing. First I installed git, then I installed SoX. I didn’t get any error messages and the installation has spawned a sox-folder in my Users/myName-folder.
However when I use the program by typing sox in the “Terminal,” nothing happens, all I get is “command not found.”
Does anybody know how to troubleshoot this?
16 Answers
Probably better on superuser? Based on the and /Users I am guessing you are on Mac OS X?
If all you did was git clone it down, you have the source code to the application and not a binary.
You would need to cd sox-folder and then do the ./configure && make && make install dance. But as you say you are new to this, that might be a bit rough.
If you are on Mac OS X then something like Homebrew or MacPorts might help you here, as they both have packages/ports for SoX. If you are not on Mac OS X, most distribution of *nix will have a package available (i.e. yum install sox, apt-get install sox, etc…) but more information would be needed.
If you just want to run sox, go here and grab the precompiled Mac OS X Binary: sox-14.3.2-macosx.zip. To compile what you have you will need autoconf, automake, etc… Basically the entire autotools toolchain, and that is probably overkill assuming you just want to run the utility.
I used Homebrew to install sox for me with the command
brew install soxAnd, assuming I am using the bash shell instead of the default zsh as of 2020, I would add the following to the hidden .bash_profile in the home directrly for sox to be picked up
export PATH="/usr/local/bin:$PATH"This I normally do after installing Homebrew for the first time. You only need to add this to the .bash_profile once.
Check if it's in the path
which soxtry launching it using the complete path. /usr/local/.../sox
check permissions to the sox binary.
This article explains in detail to have SoX running in Ubuntu. It worked for me, so I think it should work for you too
Edit:
Simplest way in ubuntu would be to run these two commands
sudo apt-get install libasound2-plugins libasound2-python libsox-fmt-all
sudo apt-get install soxIf you are in some other Linux, like CentOS or you need support for Vorbis and Ogg, you will have to compile from source, found by following the link above
0Install the App
- Press Command+Space and type Terminal and press enter/return key.
- Run in Terminal app: ruby -e "$(curl -fsSL )" < /dev/null 2> /dev/null and press enter/return key. Wait for the command to finish.
- Run: brew install sox
Courtesy:
brew install sox works for me.