/usr/bin/ld: cannot find -lopencv_imgcodecs

2,504 views
Skip to first unread message

ARGHYA PAL

unread,
Jul 6, 2016, 3:02:20 PM7/6/16
to Caffe Users
When I did;
make all

I got error:

LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1



and finally when I did:
python
and
within python

>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: No module named _caffe










Xinyu Ou

unread,
Jul 8, 2016, 11:35:30 PM7/8/16
to Caffe Users
hi, I get the same message.

and I use ubuntun 16.04, opencv 3.1, cuda 8.0 ,are you fixed this issue?

在 2016年7月7日星期四 UTC+8上午3:02:20,ARGHYA PAL写道:

Willie Liao

unread,
Jul 29, 2016, 2:44:39 AM7/29/16
to Caffe Users
If you have OpenCV 3.1, uncomment in Makefile.config (line 21):

OPENCV_VERSION := 3

Willie Liao

unread,
Jul 30, 2016, 10:46:58 PM7/30/16
to Caffe Users
Add to Makefile.config: LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs 
Or try using cmake instead.

Saurabh Chakrabarty

unread,
Jan 5, 2018, 5:45:07 AM1/5/18
to Caffe Users
Thanks Willie. CMake compilation helped!

ky1045...@gmail.com

unread,
Mar 29, 2018, 7:24:32 AM3/29/18
to Caffe Users
I have add to Makefile.config: LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
But it does not work.Do you know why?

在 2016年7月31日星期日 UTC+8上午10:46:58,Willie Liao写道:

Balaji Chetty

unread,
Jun 12, 2018, 10:22:20 AM6/12/18
to Caffe Users
I am facing same isssue
Reply all
Reply to author
Forward
0 new messages