audiowaveform
audiowaveform copied to clipboard
Installing on AWS Linux?
I'm trying to install it on AWS EC2 Linux, and unfortunately yum
shows that libsndfile
and libsndfile-dev
packages are not available. Is there another way to install these? I tried using brew
, and supposedly it's installed, but cmake
still fails with the following error:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find LibSndFile (missing: LIBSNDFILE_LIBRARY
LIBSNDFILE_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLibSndFile.cmake:38 (find_package_handle_standard_args)
CMakeLists.txt:71 (find_package)
Any help would be appreciated.
@bartwalczak which AMI do you use, the Amazon one or another Ubuntu distribution?
The Amazon one.
@bartwalczak it is based on Red Hat I think — I will give it a go tomorrow (Tuesday).
Thank you.
Hi Bartlomiej,
Please let us know Linux distro and version you're using. Did you see the instructions for installing under Fedora in the ReadMe?
Note that we have binary packages available for Ubuntu on Launchpad here, but not RPMs at this stage.
Chris
Hi chrisn,
This is Amazon Linux AMI 2015.03.
Yes, I was following the instructions, and while trying to install libsndfile
, I get the error that the libsndfile
package is not available through yum
. I installed it using brew
, but cmake
fails to see it.
@bartwalczak brew
works for non-OSX machines? I was not aware of that :smiley:
I had a preliminar look and found a way to install it by enabling repoforge
but libFLAC
dependency is missing.
From repoforge.org/use:
sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
# won't work due to libFLAC:
sudo yum install --enablerepo=rpmforge-extras libsndfile-devel
# will work but have not tried to go farther than that:
sudo yum install --enablerepo=rpmforge-extras --skip-broken libsndfile-devel
There's the Linux version of brew called linuxbrew, and it does work :)
I'm still getting No package libsndfile-devel available.
from yum
. I think I'll try with Ubuntu EC2 machine... Darn, it was the last step...
I'm using AWS Elastic Beanstalk which makes use of 64bit Amazon Linux 2015.03 v1.4.3 (the custom AMI ID is ami-6b50291c
). There's nothing special about Elastic Beanstalk ... at the end of the day it uses EC2 instances (hence the AMI ID).
Running this ... 👇
$ sudo yum install git cmake libmad-devel libsndfile-devel gd-devel boost-devel
... successfully installs all except libmad-devel
and libsndfile-devel
. Below is the relevant output ...
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
That said, this is not a problem with audiowaveform ... all this means is that the repositories enabled for Amazon Linux AMIs do not have libmad-devel
and libsndfile-devel
by default.
You might have to simply add your own sources I guess.
For what it's worth ... I've posted this on StackOverflow here ... http://stackoverflow.com/questions/31287024/how-to-install-audio-waveform-program-on-aws-elastic-beanstalk
@itsmrwave I am interested by what your findings – last time I tried I hardly managed to install libsndfile-devel
and for what I remember, when I managed to, libflac put me in trouble. So I gave up.
If you or @bartwalczak make some progress, feel free to share them here or with a PR because it would be very helpful :-)
I gave up trying to install it on Amazon Linux AMI, and chose Ubuntu from their list. I had no issues there.
@oncletom Sure. Will do ... maybe someone on SO might have some insight. Unlike @bartwalczak I don't have the luxury of using Ubuntu. Seems Elastic Beanstalk uses Amazon Linux (see supported platforms).
@oncletom Seems @bartwalczak's use case was slightly different since I was kinda using Elastic Beanstalk (which only has Amazon Linux AMI's on the list. And so settling for Ubuntu wasn't an option. In summary there was no solution in sight ... so I settled with a Docker solution.
In a nutshell Docker let's you package your app into a Linux container which will run on the kernel of the host (completely isolated). In the host you can pretty much do whatever you want without affecting the host one bit.
It's worked for me.
So I'm running a docker container still on Elastic Beanstalk (still with Amazon Linux) ... in the container I'm running Ubuntu 14.04. @chrisn mentioned that there are Ubuntu packages already so that makes it a breeze! :-) :-) :-)
@itsmrwave Great to hear that you have this working!
I have just managed to make audiowaveform
work on Amazon AWS (Amazon Linux). What I did was:
- Installed
audiowaveform
debian dependencies via yum - Manually installed
libsndfile
from source via this tutorial - Manually installed
libmad
from source via this tutorial. Here the trick was to tweak some parameters onMakefile
as per this other page - Followed
audiowaveform
install instructions - Set this env variable
export LD_LIBRARY_PATH=/usr/lib
soaudiowaveform
could findlibsndfile
library properly - Made sure I had proper locale set:
export LC_ALL="en_US.UTF-8"
- Tested
audiowaveform
with success and generated few .png for testing!
Now my goal is to run audiowaveform
on Amazon Lambda! Any hints? Can I just copy some of the files into the .zip I upload to Lambda and have it work properly? How can I create a single executable file (or at least which files must I copy to Lambda)? I think this should work because Lambda also runs on Amazon Linux!
I also needed to install libid3tag
:
wget http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
tar xf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b
./configure --prefix=/usr
make
sudo make install
Thanks for the excellent instructions, @renatoargh 👍
If you need to install audiowaveform on Elastic Beanstalk here is the config I'm using: https://gist.github.com/dmongeau/467a11fd0d200c7839d3aa6d35d0f209
Any success on deploying this to Lambda? Are there other alternatives?
wget https://github.com/libsndfile/libsndfile/releases/download/1.0.31/libsndfile-1.0.31.tar.bz2`
tar -xf libsndfile-1.0.31.tar.bz2
cd libsndfile-1.0.31
./configure
make
sudo make install
Worked for me. I needed libsndfile with fastaudio.