espeak安装报错error while loading sh

作者: Andy9918 | 来源:发表于2019-09-29 12:01 被阅读0次

环境:centos7.5,以最小化安装,安装完espeak后,执行espeak后报错:
espeak: error while loading shared libraries: libportaudio.so.2: cannot open shared object file: No such file or directory

执行ldconfig更新一下,还是不行。

因为/usr/local/lib/目录不在默认的搜索范围内,通过命令ldconfig也不行,查看ld.so.conf文件内容。

[root@localhost lib]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

进入/etc/ld.so.conf.d目录下,新建一个localusr.conf的文件
[root@localhost ld.so.conf.d]# cat localusr.conf
/usr/local/lib/

再次执行正常解决:
[root@localhost ld.so.conf.d]# ldconfig
[root@localhost ld.so.conf.d]# espeak –x –q –v en-us "I am a student."
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
[root@localhost ld.so.conf.d]# espeak --version
eSpeak text-to-speech: 1.48.03 04.Mar.14 Data at: /usr/share/espeak-data
[root@localhost ld.so.conf.d]#

相关文章

网友评论

    本文标题:espeak安装报错error while loading sh

    本文链接:https://www.haomeiwen.com/subject/sdrfpctx.html