在odroid中opencv安装错误

时间:2014-02-03 07:36:41

标签: linux opencv odroid

我正在尝试在odroid board上使用opencv和xubuntu。

下载opencv2.4.8 并执行以下命令

cmake -D CMAKE_BUILD_TYPE=REALEASE _D CMAKE_INSTALL_PREFIX=/usr/local/opencv make

接下来是 opencv linux install

但输入make时出错。

[  9%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_sunras.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_base.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_bmp.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_pxm.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_imageio.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg2000.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_png.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_exr.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

如果我错过了一些libs,请告诉我需要什么样的lib以及我应该做什么。


我通过下载这些库解决了这个问题。

libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev
libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev

但会出现此错误。

Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/local/lib/libavcodec.a(videodsp_armv5te.o): In function `ff_prefetch_arm':
/home/odroid/odroid-sources/sources/ffmpeg/libavcodec/arm/videodsp_armv5te.S:29:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_prefetch_arm' defined in .text section in /usr/local/lib/libavcodec.a(videodsp_armv5te.o)
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

2 个答案:

答案 0 :(得分:2)

如果还有人在odroid中遇到open cv的问题,他们可以查看此链接 http://forum.odroid.com/viewtopic.php?f=77&t=7445

您可以从该链接下载具有Ubuntu 14.04 Robotics Edition for ODROID-U3(ROS + OpenCV + PCL)的图像。预装了Open CV,USB摄像头正常工作。

如果您需要操作系统安装说明,可以在此处找到一些步骤 http://com.odroid.com/sigong/blog/blog_list.php?bid=130

答案 1 :(得分:1)

我遇到了与U3相同的问题。我尝试了三件事:

  1. 像往常一样编译OpenCV,但错误相同,
  2. 将Ubuntu 12.11 Robotics Edition与Open CV,ROS和其他库一起使用(这些库有效,但在检测无线网络方面存在问题),
  3. 像这样sudo apt-get install libopencv-xxx安装库。最后一种方法适用于XUbuntu,但我无法使用VideoCapture,因为它显示了V4L错误。