/usr/bin/ld: 尝试安装时找不到 -lusb-1.0

时间:2021-06-16 09:46:56

标签: c++ linux gcc cmake gnu-make

我试图从 ZED2 相机编译一个示例应用程序,但是当我在 make 之后执行 cmake .. 时,它抛出了如下错误:

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libusb-1.0.so', needed by 'ZED_Depth_Sensing'.  Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/all' failed
make[1]: *** [CMakeFiles/ZED_Depth_Sensing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

然后我制作了符号链接:

libusb-1.0.so -> /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
libusb-1.0.so.0 -> /lib/i386-linux-gnu/libusb-1.0.so.0

并再次尝试 make,这一次它向我抛出此错误:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: cannot find -lusb-1.0
collect2: error: ld returned 1 exit status
CMakeFiles/ZED_Depth_Sensing.dir/build.make:131: recipe for target 'ZED_Depth_Sensing' failed
make[2]: *** [ZED_Depth_Sensing] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/all' failed
make[1]: *** [CMakeFiles/ZED_Depth_Sensing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

如何解决这个问题?

0 个答案:

没有答案
相关问题