在树莓派非法指令 [英] Illegal instruction in Raspberry Pi
问题描述
今天,我编制了 OpenCV的主
从 github上
下载。随着网页这些说明 HTTP://ariandy1.word$p$pss.com/2013/02/13/raspberry-pi-rasbian-opencv/
,最后在 OpenCV的
成功编译。但是,当我写了一个简单的 C ++
方案,链接它的 -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_video
,运行它在终端。发生错误,说非法指令
。但是,当我删除 OpenCV的
依赖code,并重新编译,就可以成功运行。
我怀疑,由安装的软件包apt-get的
有一些错误。但我无法找到他们。
有谁面对这一问题?
Today, I compiled the opencv-master
downloaded from github
. With these instructions in the webpage http://ariandy1.wordpress.com/2013/02/13/raspberry-pi-rasbian-opencv/
, and finally the OpenCV
compiled successfully. But when I wrote a simple C++
program, link it with the -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_video
, run it in terminal. An error occured, says Illegal instruction
. But when I remove the OpenCV
-dependent code, and recompile, it can run successfully.
I doubt that the packages installed by apt-get
have some bugs. But I can't find them.
Does anyone face this problem?
的的/etc/apt/sources.list
是:
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://www.deb-multimedia.org/ wheezy main non-free
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free
更新
的dmesg
的输出是: http://pastebin.com / dsr8mgVY
更新2
LDD
命令的输出是:的http://引擎收录。 COM / s7sUQAbk
更新3
的'文件'命令的输出是: http://pastebin.com/Q1eaYtjk
The output of 'file' command is: http://pastebin.com/Q1eaYtjk
推荐答案
我不知道在树莓派的非法指令的确切原因,但我觉得一个解。只需重新编译
OpenCV的
与 -DWITH_FFMPEG:BOOL ='0'
。如果没有的ffmpeg
,摄像机仍然有效。
I don't know the exact reasons of the Illegal instruction in Raspberry Pi
, but I find a solution. Just recompile OpenCV
with -DWITH_FFMPEG:BOOL='0'
. Without the ffmpeg
, the video camera still works.
这篇关于在树莓派非法指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!