Ubuntu18. 04 + catkin for ROS melody_Make compile robot_Voice, the error message is as follows:,
Scanning dependencies of target iat_publish
[ 12%] Building CXX object robot_voice/CMakeFiles/iat_publish.dir/src/iat_publish.cpp.o
[ 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
/home/mc/ros/vision/src/robot_voice/src/linuxrec.c:12:10: fatal error: alsa/asoundlib.h: 没有那个文件或目录
#include <alsa/asoundlib.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
robot_voice/CMakeFiles/iat_publish.dir/build.make:110: recipe for target 'robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o' failed
make[2]: *** [robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o] 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
Solution:
sudo apt-get install libasound2-dev
Or
sudo yum install alsa-lib-devel
Read More:
- ORB-SLAM3 Compile Error: recipe for target ‘CMakeFiles/ORB_SLAM3.dir/src/LocalMapping.cc.o‘ failed
- Eclipse Godson Error: Makefile:recipe for target ‘clean‘ failed
- [Solved] error adding symbols: File in wrong format collect2: error: ld returned 1 exit status
- [PX4 Bug] make px4_sitl gazebo Error: CMake Error: The following variables are used in this project
- [Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
- ERROR: cannot launch node of type [amcl/amcl]: amcl
- [Solved] xacro: error: expected exactly one input file as argument
- ROS Gazabo Error: [ERROR]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/ ×65374;
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- How to Solve Cocoapods Installation Failure
- [Solved] SyntaxError: Missing parentheses in call to ‘print‘. Did you mean print(e)?
- How to Solve Xcode M1 simulator Error
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- [Solved] Error: In the Function of ‘fmt::v8::detail::error_handler::on_error(char const*)’
- Widgets are not available. Please install widgetsnbextension or ipywidgets 4.0
- [Solved] ./configure: error: the HTTP rewrite module requires the PCRE library
- Clion new method shows undefined reference to solution
- Cmake Error The C compiler identification is GNU 7.5.0 — The CXX compiler identification is unknown
- [Solved] Xcode13.1 Upgrade Error: CocoaPods installed but not working Failed to build gem native extension
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)