title: How to install audiowaveform program on AWS Elastic Beanstalk
body: <p>Just FYI ... context here is <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html" rel="noreferrer">AWS Elastic Beanstalk</a>. I'm trying to the install <a href="https://github.com/bbcrd/audiowaveform" rel="noreferrer">audiowaveform</a> program on 64bit Amazon Linux 2015.03 v1.4.3 (the customer AMI ID is <code>ami-6b50291c</code>). Running this ... </p>
  
  <pre><code>$ sudo yum install git cmake libmad-devel libsndfile-devel gd-devel boost-devel
  </code></pre>
  
  <p>... successfully installs all packages except <code>libmad-devel</code> and <code>libsndfile-devel</code>. Below is the relevant output ...</p>
  
  <pre><code>Failed to set locale, defaulting to C
  Loaded plugins: priorities, update-motd, upgrade-helper
  amzn-main/2015.03                                                        | 2.1 kB     00:00     
  amzn-updates/2015.03                                                     | 2.3 kB     00:00     
  Package git-2.1.0-1.38.amzn1.x86_64 already installed and latest version
  Package cmake-2.8.12-2.20.amzn1.x86_64 already installed and latest version
  No package libmad-devel available.
  No package libsndfile-devel available.
  Package gd-devel-2.0.35-11.10.amzn1.x86_64 already installed and latest version
  Package boost-devel-1.53.0-14.21.amzn1.x86_64 already installed and latest version
  Nothing to do
  </code></pre>
  
  <p>That said, this is not a problem with audiowaveform ... all this means is that the repositories enabled for Amazon Linux AMIs do not have <code>libmad-devel</code> and <code>libsndfile-devel</code> by default. I probably have to simply add my own sources I guess.</p>
  
  <p>Also to note is that no <code>yum</code> packages exist for <code>audio waveform</code> so I have to build this manually.</p>
  
  <p>Obtain the source ... </p>
  
  <pre><code>$ git clone https://github.com/bbcrd/audiowaveform.git
  $ cd audio waveform
  </code></pre>
  
  <p>Then build and install ... </p>
  
  <pre><code>$ mkdir build
  $ cd build
  $ cmake ..
  $ make
  $ sudo make install
  </code></pre>
  
  <p><strong>Question 1</strong></p>
  
  <p>On AWS EB ... the EC2 instances are configured to use Amazon sources which don't have the above packages i.e. <code>libmad-devel</code> and <code>libsndfile-devel</code>. What would be the <em>recommended</em> approach to adding these packages so that they are available to <code>yum</code>?</p>
  
  <p>I stress recommended because I feel that changing the sources from Amazon's could not be the best approach. Nor is adding another source that could conflict with Amazon's packages ... etc etc etc ...</p>
  
  <p><strong>Question 2</strong></p>
  
  <p>Assuming I'm able to install <code>libmad-devel</code> and <code>libsndfile-devel</code>. I still have to build this manually since there are no packages of <code>audiowaveform</code>. On AWS EB I could write a script to do this as each instance is being instantiated ... but I feel this isn't ideal, slow and kinda error-prone. Anyone have advice on how I can do this better?</p>
  
  <p>Probably prepare an AMI with this already built that's based off <code>ami-6b50291c</code>. Thoughts?</p>
  
  <p><strong>Core Objective</strong></p>
  
  <p>I don't have to use <code>audiowaveform</code> ... my objective really is to extract the peak points of some audio (MP3). I will set this up as a separate question.</p>