在树莓派非法指令 [英] Illegal instruction in Raspberry Pi

查看:1830
本文介绍了在树莓派非法指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我编制了 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆