我正在托管一个python flask服务,该服务使用soundfile库进行音频计算。它在本地运行良好,但是当我在redhat上托管它时,我看到以下问题。任何建议-
from soundfile import read
File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/soundfile.py", line 265, in <module>
_snd = _ffi.dlopen('sndfile')
File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 139, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 769, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 757, in _load_backend_lib
raise OSError("library not found: %r" % (name,))
OSError: library not found: 'sndfile'
尝试安装libsndfile
[dshanm@aqts-popro-1a-05885815] var/output/logs% sudo yum install libsndfile
Loaded plugins: priorities, security
Setting up Install Process
No package libsndfile available.
Error: Nothing to do
答案 0 :(得分:0)
声音文件Python模块取决于libsndfile
本机库。您需要将其安装在您的操作系统上:
$ yum install libsndfile