/usr/bin/ld: error: cannot find -lceres

/usr/bin/ld: error: cannot find -lceres

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:55: error: undefined reference to 'ceres::Problem::SetParameterization(double*, ceres::LocalParameterization*)'

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:56: error: undefined reference to 'ceres::Problem::SetParameterization(double*, ceres::LocalParameterization*)'

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:71: error: undefined reference to 'ceres::Problem::SetParameterBlockConstant(double const*)'

首先

/usr/local/lib 目录下有libceres.a

查看1 ld链接是否为下面的

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ ls -ll ld
lrwxrwxrwx 1 root root 19 12月 10 16:03 ld -> x86_64-linux-gnu-ld

如果不是:

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ sudo ln -sf x86_64-linux-gnu-ld /usr/bin/ld

改过来

查看2

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ cd /etc/ld.so.conf.d/
sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ ls
fakeroot-x86_64-linux-gnu.conf  x86_64-linux-gnu.conf
i386-linux-gnu.conf             zz_i386-biarch-compat.conf
libc.conf
sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ cat libc.conf
# libc default configuration
/usr/local/lib
没有添加 然后

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ sudo ldconfig

你可能感兴趣的:(caffe,c++,人工智能)