libopencv_highgui.so.4.4:无法打开共享对象文件:没有这样的文件或目录

Posted

技术标签:

【中文标题】libopencv_highgui.so.4.4:无法打开共享对象文件:没有这样的文件或目录【英文标题】:libopencv_highgui.so.4.4: cannot open shared object file: No such file or directory 【发布时间】:2020-06-28 11:13:08 【问题描述】:

我正在编译我的代码 g++ -std=c++11 -I /usr/local/include/opencv4/recordVideo.cpp -L /usr/local/lib -lopencv_objdetect -lopencv_features2d -lopencv_imgproc -lopencv_highgui -lopencv_core -lopencv_videoio 我收到错误 加载共享库时出错: 但它存在于 /usr/local/lib 作为 libopencv_highgui.so.4.4 libopencv_highgui.so.4.4.0

【问题讨论】:

【参考方案1】:

使用链接https://github.com/cggos/dip_cvqt/issues/1解决

    Find the folder containing the shared library libopencv_core.so.3.2 using the following command line.

sudo find / -name "libopencv_core.so.3.2*"

Then I got the result: /usr/local/lib/libopencv_core.so.3.2.
2. Create a file called /etc/ld.so.conf.d/opencv.conf and write to it the path to the folder where the binary is stored.For example, I wrote /usr/local/lib/ to my opencv.conf file.
3. Run the command line as follows.

sudo ldconfig -v

    Try to run the test binary again.

【讨论】:

以上是关于libopencv_highgui.so.4.4:无法打开共享对象文件:没有这样的文件或目录的主要内容,如果未能解决你的问题,请参考以下文章