遇到usrbinld: cannot find -lcufft解决方法。

    xiaoxiao2021-04-17  30

    Ubuntu15.04中安装完opencv2.4.9后,进入opencv目录/samples/c/ 运行./build_all.sh   出先下面错误:

    /usr/bin/ld: cannot find -lcufft

    /usr/bin/ld: cannot find -lnpps

    /usr/bin/ld: cannot find -lnppi

    /usr/bin/ld: cannot find -lnppc

    /usr/bin/ld: cannot find -lcudart

    去网上找了许多解决/usr/bin/ld: cannot find -lxxx问题的资料,但是都没有解决。

    不过看到一些材料中说libcufft,libnpps,libnppi,libnppc,libcudart是cuda的库,,搜索/usr/local/cuda-7.0/lib64,果然发现了libcufft.so.7.0,libnpps.so.7.0,libnppi.so.7.0,libnppc.so.7.0,libcudarts.so.7.0,

    既然报错说是/usr/bin/ld: cannot find -lcufft,那是不是因为/usr/local/lib下面没有libcufft.so.7.0,libnpps.so.7.0,libnppi.so.7.0,libnppc.so.7.0,libcudarts.so.7.0的软连接? 

    于是分别对上面几个文件建立软连接 sudo ln -s /usr/local/cuda-7.0/lib64/libcufft.so.7.0 /usr/local/lib/libcufft.so  

    再次进入opencv目录/samples/c/ 运行./build_all.sh 问题解决,不会再报错,然后运行./find_obj 会出现无比nice的测试结果。。

    完毕。

    转载请注明原文地址: https://ju.6miu.com/read-673443.html

    最新回复(0)