【发布时间】:2014-04-24 19:16:45
【问题描述】:
我的服务器抛出了这个错误
Sox::Error (sox FAIL formats: no handler for file extension `mp3'
)
此人 (https://superuser.com/questions/421153/how-to-add-a-mp3-handler-to-sox) 遇到了类似问题。那里列出的解决方案是
sudo apt-get install libsox-fmt-mp3
运行此程序后,我仍然遇到相同的错误,因此我卸载了 sox (sudo apt-get remove sox),然后重新安装了它。在这一点上,我确信它们都安装了最新版本,因为任何安装它们的尝试都会产生这种情况
libsox-fmt-mp3 is already the newest version.
sox is already the newest version.
但是,我仍然收到同样的错误。
知道我错过了什么吗?
编辑:
我正在使用 ruby-sox gem (https://github.com/TMXCredit/ruby-sox),它表示以下内容应该足够了。
apt-get install libsox-fmt-all sox libchromaprint-dev
但是所有这些都安装了,仍然没有骰子。
编辑:
我认为发生这种情况的唯一方法是,如果 sox 在错误的位置查找 lib 文件。考虑到这一点,这些细节可能会有所帮助,
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
当我卸载 sox (apt-get remove sox) 时,我会在搜索 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
为了摆脱这只袜子并希望在除了宝石体验之外的任何地方恢复到没有袜子的状态,我尝试了
sudo apt-get remove libsox-dev
这告诉我 a) libsox-dev 没有安装 b) 我需要
sudo apt-get autoremove
删除大量不再需要的与 sox 相关的文件。此时,除了gem之外,没有sox文件。然后我
apt-get install libsox-fmt-all sox libchromaprint-dev
正如宝石所建议的那样。
没有骰子。同样的错误。
【问题讨论】:
-
我玩游戏有点晚了,但我也遇到了这个问题。我按照另一篇文章中的建议安装了
libsox-fmt-mp3,但无济于事。我的用例是录制通过互联网传输的音频。这是其他人收到此错误的情况吗?如果是,我认为问题可能是缺少 mp3 文件的标头。我尝试转换的 mp3 文件也无法在 VLC 媒体播放器中播放。