ROS error: robot_voice/iat_publish/usr/bin/ld: 找不到 -lmsc
作者:互联网
Ubuntu18.04 + ROS melodic 用 catkin_make编译robot_voice时报错:
[ 12%] Building C object robot_voice/CMakeFiles/iat_publish.dir/src/speech_recognizer.c.o
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
[ 25%] Building C object robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
[ 37%] Linking CXX executable /home/mc/ros/vision/devel/lib/robot_voice/iat_publish
/usr/bin/ld: 找不到 -lmsc
collect2: error: ld returned 1 exit status
robot_voice/CMakeFiles/iat_publish.dir/build.make:164: recipe for target '/home/mc/ros/vision/devel/lib/robot_voice/iat_publish' failed
make[2]: *** [/home/mc/ros/vision/devel/lib/robot_voice/iat_publish] Error 1
CMakeFiles/Makefile2:449: recipe for target 'robot_voice/CMakeFiles/iat_publish.dir/all' failed
make[1]: *** [robot_voice/CMakeFiles/iat_publish.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed
然后找到一个贴子,说是要到科大讯飞的平台去导出资源才行,我摘录一下在下面,
科大讯飞sdk
控制台下载:https://console.xfyun.cn/services/aisound
如果没有账号,建议注册一个,官网,再通过实名认证后,进入右上角控制台:
选择创建应用,输入相关信息后,你就成功创建一个应用了。
进入该应用,然后选择离线语音,下载linux版本的sdk
这是一个zip文件,我不想在docker里面安装unzip,所以重新打包成tar文件上传至服务器。
解压到工作空间或者系统目录后:
cd <文件目录>/libs/x64 # 如果你是64位
cd <文件目录>/libs/x86 # 如果你是32位
cp libmsc.so /usr/lib/libmsc.so
这样就完成了。
编译mrobot过程中缺少的其他库,可以通过apt install下载。
例如:
apt-get install ros-kinetic-ecto ros-kinetic-manipulation-msgs ros-kinetic-gazebo-ros-control python-gst0.10
当然前提是你使用了kinetic系统,如果是noetic,需要事先去ROS wiki查询,发现没有的话再去github下载源码自己编译。我现在编译ecto还卡着所以只好滚到kinetic继续操作。
标签:bin,ld,ROS,CMakeFiles,robot,publish,ros,iat,voice 来源: https://blog.csdn.net/tanmx219/article/details/123143357