参考帖子在linux中安装opencv3.4.1,在make环节遇上了好多错,特此记录~
==================================================
碰上的沙雕bug
1.make报错:
/usr/bin/ld: cannot find -lnppc
/usr/bin/ld: cannot find -lnppial
/usr/bin/ld: cannot find -lnppicc
/usr/bin/ld: cannot find -lnppicom
/usr/bin/ld: cannot find -lnppidei
/usr/bin/ld: cannot find -lnppif
/usr/bin/ld: cannot find -lnppig
/usr/bin/ld: cannot find -lnppim
/usr/bin/ld: cannot find -lnppist
/usr/bin/ld: cannot find -lnppisu
/usr/bin/ld: cannot find -lnppitc
/usr/bin/ld: cannot find -lnpps
/usr/bin/ld: cannot find -lcudnn
/usr/bin/ld: cannot find -lcufft
/usr/bin/ld: cannot find -llib64
solution
参考帖子a+帖子b
以 /usr/bin/ld: cannot find -lnppc 为例
首先要明白lnppc代表的是libnppc.so库文件,因此该问题的意思是:在编译的过程中,需要 libabc.so 库,而系统又找不到这个库,所以需要手动找到这个库并链接到正确位置:
locate libnppc
sudo ln -s /这个库的路径/libnppc.so.1.0 /usr/lib/libnppc.so
最后再次mke即可。
2.make,仍有报错
/usr/bin/ld: cannot find -llib64
find / -name opencv.pc
cd /usr/local/lib/pkgconfig
sudo vim opencv.cv
将"-L-L/usr/local/cuda -llib64"修改为"-L/usr/local/cuda/lib64“,如下图,并保存退出
再次make,又出现一个沙雕错QAQ
//usr/lib/liblapack.so.3: undefined reference to `gotoblas'
sudo apt-get remove libopenblas-base
再次make,终于不报错了!!!
最后一步,运行测试程序
出结果啦!开心!