OpenCV中文网站

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 安装 配置
查看: 428|回复: 0

linux下安装opencv 报错 求教

[复制链接]
发表于 2019-1-9 17:27:09 | 显示全部楼层 |阅读模式
linux
系统版本

Distributor ID: CentOS
Description:    CentOS release 6.6 (Final)
Release:        6.6
Codename:       Final
想要安装opencv4.0.0

make的时候报错怎么解决啊
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2578: 错误:expected ‘)’ before ‘<’ token
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2598: 错误:错误地使用了‘::’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2598: 错误:expected ‘;’ before ‘<’ token
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h: In member function ‘google::internal::UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>& google::internal::UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T>:perator=(const T*)’:
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2583: 错误:‘field_’在此作用域中尚未声明
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h: At global scope:
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2606: 错误:‘google::internal::RepeatedFieldBackInsertIterator<T> google::RepeatedFieldBackInserter’声明为模板
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2606: 错误:‘RepeatedField’在此作用域中尚未声明
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2606: 错误:expected primary-expression before ‘>’ token
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2606: 错误:expected primary-expression before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2613: 错误:‘google::internal::RepeatedPtrFieldBackInsertIterator<T> google::RepeatedPtrFieldBackInserter’声明为模板
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2613: 错误:expected primary-expression before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2613: 错误:expected ‘)’ before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2621: 错误:‘google::internal::RepeatedPtrFieldBackInsertIterator<T> google::RepeatedFieldBackInserter’声明为模板
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2621: 错误:expected primary-expression before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2621: 错误:expected ‘)’ before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2630: 错误:‘google::internal::AllocatedRepeatedPtrFieldBackInsertIterator<T> google::AllocatedRepeatedPtrFieldBackInserter’声明为模板
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2630: 错误:expected primary-expression before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2630: 错误:expected ‘)’ before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2649: 错误:‘google::internal::UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator<T> google::UnsafeArenaAllocatedRepeatedPtrFieldBackInserter’声明为模板
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2649: 错误:‘RepeatedPtrField’不是‘google::protobuf’的成员
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2649: 错误:expected primary-expression before ‘>’ token
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2649: 错误:expected primary-expression before ‘const’
/home/opencv/opencv-4.0.0/3rdparty/protobuf/src/google/protobuf/repeated_field.h:2656: 错误:expected declaration before ‘}’ token
cc1plus: 警告:无法识别的命令行选项“-Wno-implicit-fallthrough”
cc1plus: 警告:无法识别的命令行选项“-Wno-inconsistent-missing-override”
cc1plus: 警告:无法识别的命令行选项“-Wno-suggest-override”
cc1plus: 警告:无法识别的命令行选项“-Wno-enum-compare-switch”
cc1plus: 警告:无法识别的命令行选项“-Wno-shorten-64-to-32”
cc1plus: 警告:无法识别的命令行选项“-Wno-unused-const-variable”
cc1plus: 警告:无法识别的命令行选项“-Wno-tautological-undefined-compare”
cc1plus: 警告:无法识别的命令行选项“-Wno-unused-local-typedefs”
cc1plus: 警告:无法识别的命令行选项“-Wno-unnamed-type-template-args”
cc1plus: 警告:无法识别的命令行选项“-Wno-delete-non-virtual-dtor”
cc1plus: 警告:无法识别的命令行选项“-Wno-narrowing”
make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set.cc.o] 错误 1
make[1]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] 错误 2
make: *** [all] 错误 2



回复

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|blog|OpenCV中文网站 ( 粤ICP备13079875号-2

GMT+8, 2019-3-23 08:36 , Processed in 0.063498 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表