TX2编译YOLOv3:./darknet: error while loading shared libraries: libopencv_highgui.so.3.4: cannot open

问题:

./darknet: error while loading shared libraries: libopencv_highgui.so.3.4: cannot open shared object file: No such file or directory

是opencv的库路径没有设置好

解决办法:

在 /usr/local/bin 下找到了所需要的 libopencv_highgui.so.3.4

 

1)修改ld的配置文件

sudo vim /etc/ld.so.conf

加入

include /usr/local/lib
注(/usr/loacal是opencv编译时设置的路径)

2) 再运行ldconfig

sudo ldconfig

3) 永久生效

修改bash.bashrc文件

sudo vim /etc/bash.bashrc

在文件末尾加入:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

激活:

source /etc/bash.bashrc

 

make clean yolo后,再make,解决问题。 

 

ref:

https://www.cnblogs.com/dyufei/p/8205077.html

https://blog.csdn.net/CV_YOU/article/details/77341631

你可能感兴趣的:(YOLO-V3,TX2)