0

I could use some help getting SOX installed on an EC2 server. My EC2 server is completely "vanilla" and is using the Amazon Linux AMI (3.4.37-40.44.amzn1.x86_64).

Most of the SOX installation instructions I could find use apt-get, which is not available on the Amazon Linux EC2 server. Since I cannot find any 'yum' instructions for installing SOX, I decided to try to compile the source myself. Here are the steps that I took:

1) I already had Git installed, so I was able to skip that step.

2) I cloned the sox repository using:

sudo git clone git://sox.git.sourceforge.net/gitroot/sox/sox 

Going into the sox directory, I can see these files:

file listing of SOX source files

3) Next, I installed the development tools on the EC2 server:

sudo yum groupinstall "Development Tools"

4) I read the instructions in the INSTALL file, which say:

To compile and install SoX (executables, libraries, manual pages) with a default configuration for your platform, run the following commands:

    ./configure
    make -s
    make install

Following those instructions, I typed:

sudo ./configure

And got the error:

Bash: ./install: No such file or directory

(Bash: ./install: No such file or directory)

Any help would be much appreciated.

=== UPDATE ====

In response to Michael Hampton's comment, I had tried "yum install sox". Sorry, I had forgotten to mention it. But it doesn't work. Here are the results:

enter image description here

3
  • 1
    Really? You didn't try yum install sox? – Michael Hampton Jul 23 '14 at 22:29
  • Sorry Michael, I had forgotten to mention that I did try yum install sox, but it didn't work. I've updated my question with that additional information. – clone45 Jul 25 '14 at 1:04
  • 1
    You have a very large number of excluded packages. Something is terribly wrong with the third party repositories you have installed. Try disabling or removing them. In particular, rpmforge is not compatible with Amazon Linux (nor are third party repos designed for RHEL/CentOS). – Michael Hampton Jul 25 '14 at 1:08
3

You're missing a few requirements in order for sox to be usable, mainly libmad. This is what I use to install sox in an EC2:

[NOTES]

In FAAC you need to delete a line making a deprecated call or it won't compile.

LIBMAD needs a patch in order to compile.

I run ldconfig after each build, it may be overkill but a couple of times I didn't do it the install chain failed.

Don't && the build commands for sox, for some reason it fails when chained.

If you don't run ldconfig after building sox, it won't be able to find it's own shared libraries and error out.

The order is important, for example, twolame will not build before libsndfile.

These are not all the required plugins for sox, just the ones I use, check the INSTALL file inside the tarball on how to get any others you might need; the process is the same, build them (enable shared explicitly if needed) and run ldconfig after the build.

yum install pkgconfig

cd /usr/local/src
wget http://sourceforge.net/projects/mad/files/madplay/0.15.2b/madplay-0.15.2b.tar.gz
wget http://sourceforge.net/projects/mad/files/libmad/0.15.1b/libmad-0.15.1b.tar.gz
wget http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
wget http://sourceforge.net/projects/sox/files/sox/14.4.1/sox-14.4.1.tar.gz
wget http://downloads.xiph.org/releases/ao/libao-1.2.0.tar.gz
wget http://downloads.sourceforge.net/twolame/twolame-0.3.13.tar.gz
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
wget http://www.wavpack.com/wavpack-4.70.0.tar.bz2
wget http://www.linuxfromscratch.org/patches/blfs/svn/libmad-0.15.1b-fixes-1.patch
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

tar xf madplay-0.15.2b.tar.gz
tar xf libmad-0.15.1b.tar.gz
tar xf libid3tag-0.15.1b.tar.gz
tar xf sox-14.4.1.tar.gz
tar xf libao-1.2.0.tar.gz
tar xf twolame-0.3.13.tar.gz
tar xf libsndfile-1.0.25.tar.gz
tar jxf wavpack-4.70.0.tar.bz2
tar zxf libogg-1.3.2.tar.gz
tar zxf libvorbis-1.3.4.tar.gz
tar zxf libtheora-1.1.1.tar.gz
tar zxf opencore-amr-0.1.3.tar.gz
tar zxf faac-1.28.tar.gz
tar zxf lame-3.99.5.tar.gz

[LIBOGG]
    cd /usr/local/src/libogg-1.3.2
    ./configure && make clean && make && make install
    ldconfig
[LIBVORBIS]
    cd /usr/local/src/libvorbis-1.3.4
    ./configure && make clean && make && make install
    ldconfig
[LIBTHEORA]
    cd /usr/local/src/libtheora-1.1.1
    ./configure && make clean && make && make install
    ldconfig
[AMR]
    cd /usr/local/src/opencore-amr-0.1.3
    ./configure && make clean && make && make install
    ldconfig
[FAAC]
    cd /usr/local/src/faac-1.28
    vi /usr/local/src/faac-1.28/common/mp4v2/mpeg4ip.h
        [DELETE]:char *strcasestr(const char *haystack, const char *needle);
    ./configure && make && make install
    ldconfig
[LAME]
    cd /usr/local/src/lame-3.99.5
    ./configure && make clean && make && make install
    ldconfig
[LIBAO]
    cd /usr/local/src/libao-1.2.0
    ./configure && make && make install
    ldconfig
[LIBSNDFILE]
    cd /usr/local/src/libsndfile-1.0.25
    ./configure && make && make install
    ldconfig
[TWOLAME]
    cd /usr/local/src/twolame-0.3.13
    ./configure && make && make install
    ldconfig
[WAVPACK]
    cd /usr/local/src/wavpack-4.70.0
    ./configure && make && make install
    ldconfig
[LIBMAD]
    cd /usr/local/src/libmad-0.15.1b
    patch -Np1 -i ../libmad-0.15.1b-fixes-1.patch
    sed "s@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@g" -i configure.ac
    touch NEWS AUTHORS ChangeLog
    autoreconf -fi
    ./configure --enable-shared && make && make install
    ldconfig
[LIBID3]
    cd /usr/local/src/libid3tag-0.15.1b
    ./configure --enable-shared && make && make install
    ldconfig
[MADPLAY]
    cd /usr/local/src/madplay-0.15.2b
    ./configure --enable-shared && make && make install
    ldconfig
[SOX]
    cd /usr/local/src/sox-14.4.1
    ./configure
    make -s
    make install
    ldconfig

These are the sox capabilities after building this way:

BUILD OPTIONS
Debugging build............no
Distro name ...............not specified!
Dynamic loading support....no
Pkg-config location........$(libdir)/pkgconfig
Play and rec symlinks......yes
Symlinks enabled...........yes

OPTIONAL DEVICE DRIVERS
ao (Xiph)..................yes
alsa (Linux)...............no
coreaudio (Mac OS X).......no
sndio (OpenBSD)............no
oss........................yes
pulseaudio.................no
sunaudio...................no
waveaudio (MS-Windows).....no

OPTIONAL FILE FORMATS
amrnb......................yes
    dlopen amrnb..............no
amrwb......................yes
    dlopen amrwb..............no
ffmpeg.....................no
flac.......................no
gsm........................yes (in-tree)
lpc10......................yes (in-tree)
mp2/mp3....................yes
id3tag....................yes
lame......................yes
    lame id3tag...............yes
    dlopen lame...............no
mad.......................yes
    dlopen mad................no
twolame...................yes
    dlopen twolame............no
oggvorbis..................yes
sndfile....................yes
dlopen sndfile............no
wavpack....................yes

OTHER OPTIONS
ladspa effects.............no
magic support..............no
png support................no
GOMP support...............yes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.