error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’

时间:2023-01-10 23:51:25

最近安装caffe,突然报这个错:

.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_mean_file(const char*)’:
.build_release/src/caffe/proto/caffe.pb.h:17957:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
                      ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_mean_file(const char*, size_t)’:
.build_release/src/caffe/proto/caffe.pb.h:17964:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
                      ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘std::string* caffe::ImageDataParameter::mutable_mean_file()’:
.build_release/src/caffe/proto/caffe.pb.h:17971:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
                      ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘std::string* caffe::ImageDataParameter::release_mean_file()’:
.build_release/src/caffe/proto/caffe.pb.h:17978:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (mean_file_ == &::google::protobuf::internal::kEmptyString) {
                      ^
.build_release/src/caffe/proto/caffe.pb.h:17982:47: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
     mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
                                               ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_allocated_mean_file(std::string*)’:
.build_release/src/caffe/proto/caffe.pb.h:17987:22: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
                      ^
.build_release/src/caffe/proto/caffe.pb.h:17995:47: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
     mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
                                               ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::clear_root_folder()’:
.build_release/src/caffe/proto/caffe.pb.h:18054:24: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
                        ^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘void caffe::ImageDataParameter::set_root_folder(const string&)’:
.build_release/src/caffe/proto/caffe.pb.h:18064:24: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
发现又是protoc的版本不对。

查了下:

sensetime@sensetime-To-be-filled-by-O-E-M:/home/zenggq/mainspace/mscnn$ which protoc
/usr/bin/protoc
sensetime@sensetime-To-be-filled-by-O-E-M:/home/zenggq/mainspace/mscnn$

sensetime@sensetime-To-be-filled-by-O-E-M:~/zenggq/caffe-bak$ pip show protobuf
Name: protobuf
Version: 3.3.0
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: protobuf@googlegroups.com
Author-email: protobuf@googlegroups.com
License: 3-Clause BSD License
Location: /home/sensetime/anaconda2/lib/python2.7/site-packages
Requires: six, setuptools
sensetime@sensetime-To-be-filled-by-O-E-M:~/zenggq/caffe-bak$

protoc --version

发现是2.5.0

索性把anaconda2下的protoc文件覆盖/usr/bin/protoc。

搞定。

error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’的更多相关文章

  1. (原)python中import caffe提示no module named google&period;protobuf&period;internal

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5993405.html 之前在一台台式机上在python中使用import caffe时,没有出错.但是 ...

  2. caffe安装编译问题-ImportError&colon; No module named google&period;protobuf&period;internal

    问题描述 ~/Downloads/caffe$ python Python (default, Dec , ::) [GCC ] on linux2 Type "help", &q ...

  3. caffe搭建--缺少 skimage-缺少 google&period;protobuf&period;internal&period;-caffe搭建--ipython--ubuntu16&period;04&plus; caffe&plus; ipython

    mkdir build && cd build cmake .. make pycaffe -j4 sudo vim /etc/profile---- export PYTHONPAT ...

  4. mac安装protobuf2&period;4&period;1时报错&period;&sol;include&sol;gtest&sol;internal&sol;gtest-port&period;h&colon;428&colon;10&colon; fatal error&colon; &&num;39&semi;tr1&sol;tuple&&num;39&semi; file not found和google&sol;protobuf&sol;message&period;cc&colon;175&colon;16&colon; error&colon; implicit instantiation of undefined template

    通过网上下载的protobuf2.4.1的压缩文件,然后进行安装,./configure和make时遇到了两个问题. 正常的安装步骤如下: ./configure make  make check m ...

  5. ImportError&colon; No module named google&period;protobuf&period;internal

    下载: protobuf-3.3.0 设置路径:export PYTHONPATH=/gruntdata/lihaiyang/local/protobuf-3.3.0/python:$PYTHONPA ...

  6. win10下Import caffe时出现&OpenCurlyDoubleQuote;ImportError&colon; No module named google&period;protobuf&period;internal”的解决办法

    解决方法:只要出现和protobuf相关的错误,只要在cmd中输入pip install protobuf,然后等待安装完成即可. ps:这时,可能会出现"pip 不是内部命令"之 ...

  7. google protobuf 使用示例

    定义.proto接口文件 package tutorial; message Person { required ; required int32 id = ; //unique ID number ...

  8. Windows下编译Google&period;Protobuf在Qt&lpar;C&plus;&plus;&rpar;中使用与Unity3d&lpar;C&num;&rpar;交互

    1.首先从Github-Protobuf下载代码,本文下载的版本号是3.1.0. 2.仔细查看各个README,有相关的资源下载和编译说明. 3.在一个方便的地方创建一个Install类型的文件夹,放 ...

  9. google protobuf使用

    下载的是github上的:https://github.com/google/protobuf If you get the source from github, you need to gener ...

随机推荐

  1. 12&period;我们不是在真空里谈软件工程, 软件要运行在硬件芯片上面, 下面看看一个计算机芯片的发展历史: http&colon;&sol;&sol;perspectives&period;mvdirona&period;com&sol;2014&sol;09&sol;august-21-2014-computer-history-museum-presentation&sol; http&colon;&sol;&sol;mvdirona&period;com&sol;jrh&sol;TalksAndPapers&sol;DileepBhandar

    电脑芯片的诞生和发展是20世纪最伟大的发明之一,芯片技术决定了计算机升级换代的速度,决定了计算机小型化实现的程度,决定了计算机智能化的程度,决定了计算机普及化的应用深度. 1971年11月15日,英特 ...

  2. 使用EPPLUS操作EXcel

    使用EPPLUS操作EXcel 时间 2014-11-06 19:28:01  姜糖水 原文  http://www.cnphp6.com/archives/58648 主题 Excel 1 下载Ep ...

  3. HTTP persistent connection

    http://en.wikipedia.org/wiki/HTTP_persistent_connection

  4. oracle学习 七 拼接变量&plus;日期函数(持续更)

    select count(KEYCODE) from STHSGDOC.ZJSJJL where ysrq=to_date(to_char(sysdate,'yyyy')||'/1','yyyy/MM ...

  5. 9会飞的li标签

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  6. python实现二叉树

    初学python,需要实现一个决策树,首先实践一下利用python实现一个二叉树数据结构.建树的时候做了处理,保证建立的二叉树是平衡二叉树. # -*- coding: utf-8 -*- from ...

  7. 自定义用户认证(继承django的)

    1.在app下创建一个自己用户认证文件,文件名随意,记得为.py文件 2.编辑该userauth.py文件 #!/usr/bin/env python #coding:utf-8 from djang ...

  8. DirectX11 With Windows SDK--26 计算着色器:入门

    前言 现在开始迎来所谓的高级篇了,目前计划是计算着色器部分的内容视项目情况,大概会分3-5章来讲述. DirectX11 With Windows SDK完整目录 Github项目源码 欢迎加入QQ群 ...

  9. replace用法替换实例

    实例一: 待处理字符串:str="display=test name=mu display=temp" 要求:把display=后的值都改成localhost JS处理方法: st ...

  10. &lbrack;sqoop&rsqb; sqoop2 使用

    sqoop版本1.99.7 ,安装省略 1. 启动server sqoop2-server start 2. sqoop2-shell 链接 表示安装成功. 创建link 查看link 创建job 查 ...