主题 : tiny6410下的程序找不到opencv的库 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 80811
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2012-10-30
最后登录: 2018-02-08
楼主  发表于: 2013-01-04 10:56

 tiny6410下的程序找不到opencv的库

从论坛上找到了一个人6410下基于QT和opencv的人脸识别程序,下到6410开放板上。QT,opencv安装好,运行程序先是提示
./QTFaceRec: error while loading shared libraries: libopencv_ml.so: cannot open shared object file: No such file or directory
我把opencv里的库文件全部复制到/usr/lib下又提示
./QTFaceRec: error while loading shared libraries: ../../lib/libopencv_ml.so:cannot open shared object file: No such file or directory
然后我export LD_LIBRARY_PATH=/usr/lib 还是不行 我猜测是库的路径放得不对,但是我现在无法知道完整的路径,蛋疼的.../.../,请问我现在该怎么办??
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-01-04 12:45
./QTFaceRec: error while loading shared libraries: ../../lib/libopencv_ml.so:cannot open shared object file: No such file or directory

必须把libopencv_ml.so放在QTFaceRec的../../lib/目录下?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 80811
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2012-10-30
最后登录: 2018-02-08
2楼  发表于: 2013-01-04 16:35

 回 1楼(kasim) 的帖子

我find了 / 目录下所有的含lib的路径,然后把.SO文件都放了一遍进去都不行,郁闷死了啊
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-01-04 16:46

 回 2楼(kiost) 的帖子

你能把编译出来的QTFaceRec附上来吗?我很好奇里面是怎么hard code “../../lib”这样的路径的。另外,如果你可以把整个QTFaceRec工程打包共享出来的话,我想对解决问题会比较有帮助。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 80811
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2012-10-30
最后登录: 2018-02-08
4楼  发表于: 2013-01-04 21:26

 回 3楼(kasim) 的帖子

这个QTFaceRec文件是作者编译好的,找不到.PRO文件,
原文在http://www.aiothome.net/read.php?tid-15707.html
附件是QTFaceRec文件,整个工程文件在原文里有下载,还请版主大神帮俺看看这个问题是在是困扰我多时了
附件: QTFaceRec.rar (52 K) 下载次数:4
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2013-01-06 20:30
我在板子上试了一下,出错信息跟你一样。还不清楚这个库的路径是怎么指定的,不过我试过把opencv-lib目录下的.so文件都放到/lib目录下,然后在/home/plg目录下运行QTFaceRec是可以的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 80811
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2012-10-30
最后登录: 2018-02-08
6楼  发表于: 2013-01-07 10:47
您的可以指的是出结果,还是解决了搜索不到opencv库的问题??
另外我那个问题貌似解决了一部分,我看了下ldcong -v 系统默认搜索的路径是 /lib 和/usr/lib
之前我只把opencv的so文件加在了/lib下,我又复制了一份在/usr/lib下 不在报错
现在又出现了找不到libts.so这个库的错误 正在解决中
级别: 新手上路
UID: 80811
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2012-10-30
最后登录: 2018-02-08
7楼  发表于: 2013-01-07 10:52

 回 5楼(kasim) 的帖子

还有个问题 通过sd拷贝的文件和通过NFS传的文件会产生什么变化吗??
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2013-01-07 11:07

 回 6楼(kiost) 的帖子

是指可以解决搜索不到opencv库
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
9楼  发表于: 2013-01-07 11:08

 回 7楼(kiost) 的帖子

理论上不会有什么变化
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."