My server threw this error
Sox::Error (sox FAIL formats: no handler for file extension `mp3'
)
This person (https://superuser.com/questions/421153/how-to-add-a-mp3-handler-to-sox) had a similar issue. The solution listed there was
sudo apt-get install libsox-fmt-mp3
After running this I still was getting the same error, so I uninstalled sox (sudo apt-get remove sox) and then reinstalled it. At this point I'm confident they're both installed with the newest versions since any attempt to install them yields this
libsox-fmt-mp3 is already the newest version.
sox is already the newest version.
However, I still am receiving the same error.
Any idea what I'm missing?
Edit:
I'm using the ruby-sox gem (https://github.com/TMXCredit/ruby-sox) which says the below should be sufficient.
apt-get install libsox-fmt-all sox libchromaprint-dev
But all those are installed and still no dice.
Edit:
The only way I can figure this to happen is if sox is looking for the lib files in the wrong place. With that in mind these details might be helpful,
sudo find / -name sox
/usr/bin/sox
/usr/lib/x86_64-linux-gnu/sox
/usr/lib/mime/packages/sox
/usr/share/doc/sox
/home/deployer/apps/eko/shared/bundle/ruby/2.1.0/gems/ruby-sox-0.0.1/lib/sox
sudo find / -name libsox-fmt-mp3
/usr/share/doc/libsox-fmt-mp3
When I uninstall sox (apt-get remove sox) then I get this when I search for sox
ubuntu@ip-10-0-0-9:~$ sudo find / -name sox
/usr/lib/x86_64-linux-gnu/sox
/home/deployer/apps/eko/shared/bundle/ruby/2.1.0/gems/ruby-sox-0.0.1/lib/sox
To get rid of this sox and hopefully return to a no sox anywhere except the gem experience, I tried
sudo apt-get remove libsox-dev
which told me a)libsox-dev wasn't installed and b) I needed to
sudo apt-get autoremove
to remove a host of files related to sox that were no longer needed. At this point, besides the gem, there were no sox files. I then
apt-get install libsox-fmt-all sox libchromaprint-dev
As the gem suggested.
No dice. Same error.
libsox-fmt-mp3
as suggested in the other post, to no avail. My use case is recording audio streamed over the internet. Is that the situation of other people getting this error? If it is, I think the problem may be a lack of a header for the mp3 file. The mp3 file I'm trying to convert won't play in VLC media player either. – Tremor