gpt4 book ai didi

OpenCV Ubuntu 安装错误

转载 作者:太空宇宙 更新时间:2023-11-03 21:53:27 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 14.10 上安装 OpenCV,但我一次又一次地遇到这个错误:(

    /usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:654: recipe for target 'lib/libopencv_highgui.so.2.4.9' failed
make[2]: *** [lib/libopencv_highgui.so.2.4.9] Error 1
CMakeFiles/Makefile2:1767: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2

最佳答案

请提供您遇到错误之前的命令历史。

如果调用 make 是错误发生前的最后一件事,您可以尝试调用 make CFLAGS="-fPIC"

关于OpenCV Ubuntu 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28752907/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com