Error when install Caffe (version CPU) on Ubuntu 16.04

72 views
Skip to first unread message

Quoc Quan

unread,
Feb 18, 2019, 6:47:55 AM2/18/19
to Caffe Users
I install Caffe follow this tutorial Deep Learning - Installing Caffe on Ubuntu. I installed Opencv (3.4.4). When run make all to install Caffe, i get this error:

CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `vtable for cv::_InputArray'
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1

How can I solve it?

Quoc Quan

unread,
Feb 18, 2019, 7:37:17 AM2/18/19
to Caffe Users
Yesterday, when Opencv not installed, I got other error when install Caffe. Now, I solve above error after run cmd
make clean
sudo ldconfig
make all
I solved this error
Reply all
Reply to author
Forward
0 new messages