TX2 上安装自己编译的opencv,使用时出现:
error while loading shared libraies :libopencv_core_so.3.4:cannot open shared object
解决办法:
Step1
sudo gedit /etc/ld.so.conf
添加:
/usr/loacal/lib
注意:/user/loacal
是opencv安装路径 就是makefile中指定的安装路径。添加之后:
继续执行:
sudo ldconfig
Step 2
sudo gedit /etc/bash.bashrc
添加:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
执行:
source /etc/bash.bashrc