caffe-安装anaconda后重新编译caffe报错
ks@ks-go:~/caffe-master$ make -j16
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/net_speed_benchmark.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
CXX/LD -o .build_release/tools/test_net.bin
CXX/LD -o .build_release/tools/finetune_net.bin
CXX/LD -o .build_release/tools/train_net.bin
CXX/LD -o .build_release/tools/device_query.bin
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
CXX/LD -o .build_release/tools/caffe.bin
CXX/LD -o .build_release/tools/extract_features.bin
CXX/LD -o .build_release/tools/compute_image_mean.bin
.build_release/tools/test_net.o:在函数‘boost::system::system_error::what() const’中:
test_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0x74):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用
test_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
test_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对��.build_release/tools/train_net.o:在函数‘boost::system::system_error::what() const’中:
train_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0x74):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用
train_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
train_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::<char_traits<char>char>, std:> :allocator<char> > const&) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/�libglog.so:对‘vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:collect2: error: ld returned 1 exit status
对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21’未定义的引用
collect2: error: ld returned 1 exit status
/../x86_64-linux-gnu/libgflags.so:�对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用
finetune_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
finetune_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned long) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21’未定义的引用
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21’未定义的引用
/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21’未定义的引用
collect2: error: ld returned 1 exit status
。。。很长一串问题
对于这个问题找了N久都没有找到答案,在caffe的issue中看到有人有同样的问题,但并没有得到答案,后来在另一个问题中看到了一个方法https://github.com/BVLC/caffe/issues/2348,
cd caffe
cp Makefile.config.example Makefile.config
and change setting in Makefile.config
mkdir build
cd build
cmake ..
./configure (??not sure??)
make all
执行一遍后发现有戏啊,可是又有一个新的关于opencv_imgcodecs的问题,同样在刚才的链接中的方法
add "opencv_imgcodecs" in Makefile.(LIBRARIES += glog gflags protobuf leveldb snappy \
lmdb boost_system hdf5_hl hdf5 m \
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs)
就是在makefile的“LIBRARIES +=”中添加一个“opencv_imgcodecs”,make clean,再make all这样刚才的问题就没有了
这样就可以了???结果又出了一个新的问题,/usr/lib/libopencv_highgui.so.2.4: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0' 1>
网上说是opencv编译的问题,于是就重新编译opencv,这次编译cmake加上一个参数:
-D BUILD_TIFF=ON
于是又屁颠屁颠的开始编译了,这一次已经有了报错的心里准备了,果然新的问题来了,//usr/lib/x86_64-linux-gnu/libsoxr.so.0:对‘GOMP_parallel@GOMP_4.0’未定义的,
对于这个问题我以为百度一下就能解决,可事实证明我还是too young too simple,这个问题找了很久都没找到答案,但是有个发现,就是稍微沾边的解释里都有anaconda,突然醒悟,我现在遭的罪不都是安装了anaconda后造成的么,搞不好是anaconda与系统兼容造成的,于是我决定anaconda
零时屏蔽了再来编译opencv试试,屏蔽的具体方法是在
sudo gedit ~/.bashrc
在下面这两句话前面加上“#”注释掉
#export PATH="/home/ks/anaconda2/bin:$PATH"
#export LD_LIBRARY_PATH="/home/ks/anaconda2/lib:$LD_LIBRARY_PATH"
然后再次来编译opencv,奇迹出现啦,经过漫长的等待,opencv终于编译完成啦,现在回头想想,caffe之所以编译报那么多错肯定也是由anaconda造成的,但是屏蔽anaconda后用以前的方法直接编译caffe还是会报很多错,不过用上面提到的cmake的方式进行编译就顺利的完成了。
总结一下经验就是:可能是anaconda自带的编译环境的版本有问题,所以今后就算想用anaconda,也要先把caffe和opencv编译好后再装anaconda!
caffe-安装anaconda后重新编译caffe报错的更多相关文章
- vue-cli新建vue项目安装axios后在IE下报错
使用脚手架新建了一个vue项目,可以在IE9+浏览器运行,但是在添加了axios后,在IE下就报错了 首先是安装axios,在命令行执行: $ npm install axios -s //执行命令, ...
- 安装atlas后执行hive命令报错
在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show dat ...
- 安装Python3后,centos使用yum报错
题记 在之前的文章中我自定义安装了Python3,并且修改了默认的 Python软链,今天想搭建一个 ftp 服务器,使用命令的时候出现了一个错误: 问题 1.使用 yum 安装 ftp工具 yum ...
- 安装npm后,nrm ls报错问题
一.nrm : 无法加载文件 E:\nodejs\nrm.ps1,因为在此系统上禁止运行脚本.有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135 ...
- Windows安装IIS后,启动网站报错:不能在此路径中使用此配置节……
在IIS里启动设置好的网站(ASP.net网站),浏览器报如下错误: 不能在此路径中使用此配置节.如果在父级别上锁定了该节,便会出现这种情况.锁定是默认设置的(overrideModeDefault= ...
- eclipse点击包(package)时报错,安装hibernate后点击包报错org/eclipse/jpt/common/utility/exception/ExceptionHandler
错误描述: 当我们点击包名时,出现如下错误提示.An error has occurred. See error log for more details.org/eclipse/jpt/common ...
- Python中安装bs4后,pycharm依然报错ModuleNotFoundError: No module named 'bs4'
学习网络抓取时,第一步出现问题. 执行示例代码 from urllib.request import urlopen from bs4 import BeautifulSoup html = urlo ...
- 静默安装oracle后,启动oem报错,解决方法!
一.手工重建EM Oracle 的gridcontrol 由两部分组成:dbcontrol 和repository. 我们可以对某一部分进行操作,也可以同时进行操作. 这里先看一个因为修改hostna ...
- MySql:CentOS7安装mysql后无法启动服务报错,(需要更新yum源)
首先:需要更新你的yum源,保证yum源最新. 1.安装: yum install -y mariadb-server 2.启动maria DB服务: systemctl start mariadb. ...
随机推荐
- Ubuntu修改系统语言为英文可支持中文
简单来说,就行修改/etc/default/locale文件,设置语言位UTF-8,如果没有这个语言,就执行命令locale-gen en_US.UTF-8进行安装,没有即时生效的话就重启. 查看当前 ...
- 子字符串substring 问题 - KMP 字符串匹配算法备忘录
本文为自己对KMP的理解. 对KMP很好的介绍可以参考 http://www.cnblogs.com/yjiyjige/p/3263858.html 本文为对这篇文章的提炼和补充. KMP算法基本思想 ...
- 使用 log4j 在控制台 打印 hibernate 语句参数
log4j.rootLogger=INFO, stdoutlog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.st ...
- 【Dream Counting, 2006 Dec-数数的梦】数位dp
题意:给定两个数,问区间[A,B]中0~9分别出现了多少次.A,B<=10^18 题解:应该是最裸的数位dp吧..一开始没有记忆化tle了TAT 我们可以求出区间[0,B]的,再减去区间[0,A ...
- [POI2004] SZP (贪心+拓扑排序)
[问题描述] Byteotian 中央情报局(BIA) 雇佣了许多特工. 他们每个人的工作就是监视 另一名特工. Byteasar 国王需要进行一次秘密行动,所以他要挑选尽量多的信得过的特工. 但 是 ...
- Select 使用不当引发的core,你应该知道的
排查一个死机问题,搞了好几天时间,最终确定原因:最终确定问题原因,在此分享一下: 第一步:常规根据core文件查看栈信息,gdb –c core xxxx 如下rip不正确,指令地址错乱,栈信息已破坏 ...
- 排序中topK那点事(转)
问题描述:有 N (N>1000000)个数,求出其中的前K个最小的数(又被称作topK问题). 这类问题似乎是备受面试官的青睐,相信面试过互联网公司的同学都会遇到这来问题.下面由浅入深,分析一 ...
- bisai.py
比赛专用py #!/usr/etc/env python #encoding:utf-8 #by i3ekr #token import re,os,requests res = "(fla ...
- pycharm模板参数
# -*- coding: utf-8 -*-# @Time : ${DATE} ${TIME}# @Author : cxa# @File : ${NAME}.py# @Software: ${PR ...
- Timer类
构造方法:public Timer() 创建一个新计时器.相关的线程不 作为守护程序运行. public Timer(boolean isDaemon) 创建一个新计时器,可以指定其相关的线程作为守护 ...