undefined reference to cv::String::allocate

Having trouble installing the latest version of caffe2? The error says undefined reference to cv::String::allocate. It looks like a conflict with OpenCV.

Potentially related to multiple / old versions of
OpenCV: /lib/ undefined reference to `cv::String::...' · Issue #1864 · facebookarchive/caffe2 · GitHub


make uninstall in your OpenCV source folder.

  • Solution from Kevin S.