博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
caffe-安装anaconda后重新编译caffe报错
阅读量:4645 次
发布时间:2019-06-09

本文共 10929 字,大约阅读时间需要 36 分钟。

ks@ks-go:~/caffe-master$ make -j16CXX/LD -o .build_release/tools/convert_imageset.binCXX/LD -o .build_release/tools/net_speed_benchmark.binCXX/LD -o .build_release/tools/upgrade_net_proto_text.binCXX/LD -o .build_release/tools/upgrade_net_proto_binary.binCXX/LD -o .build_release/tools/test_net.binCXX/LD -o .build_release/tools/finetune_net.binCXX/LD -o .build_release/tools/train_net.binCXX/LD -o .build_release/tools/device_query.binCXX/LD -o .build_release/tools/upgrade_solver_proto_text.binCXX/LD -o .build_release/tools/caffe.binCXX/LD -o .build_release/tools/extract_features.binCXX/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
, std::allocator
>::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用test_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)’未定义的引用test_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string
, std::allocator
>::_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
, std::allocator
>::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用train_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)’未定义的引用train_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::compare(std::__cxx11::basic_string
, std::allocator
> const&) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_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
, std::allocator
>::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_stringbuf
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::assign(char const*)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_assign(std::__cxx11::basic_string
, std::allocator/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::compare(std::__cxx11::basic_string
char>, std:> :allocator
> const&) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_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
, std::allocator
>::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/�libglog.so:对‘vtable for std::__cxx11::basic_stringbuf
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::assign(char const*)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_assign(std::__cxx11::basic_string
, std::allocator
> const&)@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_ostringstream
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::reserve(unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:collect2: error: ld returned 1 exit status对‘std::__cxx11::basic_string
, std::allocator
>::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
, std::allocator
>::_M_replace(unsigned long, unsigned long, char const*, unsigned long)’未定义的引用finetune_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xa1):对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)’未定义的引用finetune_net.cpp:(.text._ZNK5boost6system12system_error4whatEv[_ZNK5boost6system12system_error4whatEv]+0xe3):对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::compare(std::__cxx11::basic_string
, std::allocator
> const&) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_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
, std::allocator
>::_M_construct(unsigned long, char)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_stringbuf
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::assign(char const*)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_assign(std::__cxx11::basic_string
, std::allocator
> const&)@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘vtable for std::__cxx11::basic_ostringstream
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::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
, std::allocator
>::rfind(char, unsigned long) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_stringbuf
, std::allocator
>::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::~basic_string()@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::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
, std::allocator
>::find(char, unsigned long) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_ostringstream
, std::allocator
>::~basic_ostringstream()@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘VTT for std::__cxx11::basic_ostringstream
, std::allocator
>@GLIBCXX_3.4.21’未定义的引用/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libgflags.so:对‘std::__cxx11::basic_string
, std::allocator
>::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21’未定义的引用/usr/local/lib/libglog.so:对‘std::__cxx11::basic_string
, std::allocator
>::compare(char const*) const@GLIBCXX_3.4.21’未定义的引用collect2: error: ld returned 1 exit status。。。很长一串问题

对于这个问题找了N久都没有找到答案,在caffe的issue中看到有人有同样的问题,但并没有得到答案,后来在另一个问题中看到了一个方法,

cd caffecp Makefile.config.example Makefile.configand change setting in Makefile.configmkdir buildcd buildcmake .../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 ' 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!

转载于:https://www.cnblogs.com/kingstrong/p/6015157.html

你可能感兴趣的文章
团队冲刺04
查看>>
我的Python分析成长之路8
查看>>
泛型在三层中的应用
查看>>
SharePoint2010 -- 管理配置文件同步
查看>>
.Net MVC3中取得当前区域的名字(Area name)
查看>>
获得屏幕像素以及像素密度
查看>>
int与string转换
查看>>
adb命令 判断锁屏
查看>>
推荐一个MacOS苹果电脑系统解压缩软件
查看>>
1035等差数列末项计算
查看>>
CDMA鉴权
查看>>
ASP.NET MVC Identity 兩個多個連接字符串問題解決一例
查看>>
过滤器与拦截器区别
查看>>
USACO 1.5.4 Checker Challenge
查看>>
第二阶段站立会议7
查看>>
[18]Debian Linux Install GNU GCC Compiler and Development Environment
查看>>
JAVA多线程
查看>>
ACE(Adaptive Communication Environment)介绍
查看>>
delphi 更改DBGrid 颜色技巧
查看>>
python编码问题
查看>>