Ubuntu16.04安装ceres报错:recipe for target 'bin/system_test' failed以及undefined reference to `google::bas

在Ubuntu 16.04上安装ceres时遇到报错,由于gcc和g++版本过低导致。解决方法包括升级到5.0以上版本,切换gcc版本,删除并重建build文件,重新执行编译命令,最终成功安装ceres。
摘要由CSDN通过智能技术生成

额,在ubuntu16.04上安装ceres,结果出现了下面的报错,搞了好久没有搞定,非常生气!

不过总之问题最后还是解决了~
简而言之就是这样的

出现问题的原因: gcc和g++的版本太低了()!
解决的方法:

1.把gcc和g++的版本同时设置成为5.0以上的,然后设置gcc切换的方法剧可以参考这个:gcc/g++多版本切换使用
2.再build的文件里输入make clean或者直接把build文件删掉重新建一个
3.再依次执行:cmake .. make sudo make install
然后就成功啦!

这里吐槽一下gcc版本的问题,很多时候需要老版本,很多时候又需要新一点的版本,不知道新版本就不能向前把兼容性做的好一点吗?

cmake..之后的错误“
Did not find METIS library (optional SuiteSparse dependency)
-- Found SuiteSparse: TRUE (found version "4.4.6")
-- Found SuiteSparse 4.4.6, building with SuiteSparse.
-- Found CXSparse: /usr/include/suitesparse (found version "3.1.4")
-- Found CXSparse version: 3.1.4, building with CXSparse.
-- Building without Apple's Accelerate sparse support.
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success
-- Found Gflags: /usr/include
-- Found Google Flags header in: /usr/include, in namespace: google
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available.
-- Failed to find installed glog CMake configuration, searching for glog build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for glog, will perform search for installed glog components.
-- Found Glog: /usr/include
-- Found Google Log (glog). Assuming glog was built with gflags support as gflags was found. This will make gflags a public dependency of Ceres.
-- Using Ceres threading model: CXX11_THREADS
-- Failed to find Google benchmark library, disabling build of benchmarks.
-- Building Ceres as a static library.
-- No

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值