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:
- [Solved] MSYS2+ fatal error: zlib.h: There is no such file or directory
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] fatal error: bits/libc-header-start.h: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- Centos pip install uwsgi error: “fatal error: Python.h: No such file or directory”
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] src/delly.h:8:42: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- Containerd Error: btrfs/ioctl.h: No such file or directory
- crtdbg.h No such file or directory error [How to Solve]
- Redis installation error: jemalloc/jemalloc.h: No such file or directory.
- ROS Error: Roslaunch got a ‘No such file or directory‘ error while attempting to run xterm -e gdb –args
- C++: fatal error: variant: No such file or directory
- SLAMBook2 in ch3 code run fatal error: Eigen/Core: No such file or directory
- Yarn install error: 00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: ‘install‘