opencv version conflict ?

asked 2018-06-06 03:42:59 -0500

tengfei han gravatar image

when I try to run roslaunch main.launchin the terminal,

OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp, line 740
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp:740: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName

I have searched these error information, it seems like a conflict between opencv2.4.8 and 3.3.1. so all OpenCV version information declared in CMakeLists.txt was changed to

find_package(OpenCV 3.3.1)

but it still cannot fix this problem, other people think that I should remove opencv2.4.8 from Ubuntu, actually I did it according to a suggestion(https://askubuntu.com/questions/564290/how-to-uninstall-opencv-2-4-9-completely-from-ubuntu) even worse, when I enter

sudo apt-get autoremove opencv-doc opencv-data libopencv-dev libopencv2.4-java libopencv2.4-jni python-opencv libopencv-core2.4 libopencv-gpu2.4 libopencv-ts2.4 libopencv-photo2.4 libopencv-contrib2.4 libopencv-imgproc2.4 libopencv-superres2.4 libopencv-stitching2.4 libopencv-ocl2.4 libopencv-legacy2.4 libopencv-ml2.4 libopencv-video2.4 libopencv-videostab2.4 libopencv-objdetect2.4 libopencv-calib3d2.4

I cannot catkin_make successfully

a little advice would be appreciated.

edit retag flag offensive close merge delete

Comments

Which Ubuntu and ROS distribution do you have? How did you install OpenCV 2 and OpenCV3, via package manager or from source?

dljubic gravatar image dljubic  ( 2018-06-16 05:13:31 -0500 )edit