Makefile:160: recipe for target 'all' failed (Ubuntu 16.06 + Opencv3.2)解决办法
来源:互联网 发布:网络短信免费发送 编辑:程序博客网 时间:2024/06/08 18:13
前言
之前一直用的opencv 好好的,今天安装了anaconda之后,python中的opencv不能用了,即便是拷贝cv2.so之后也是不能用,问题如下:
根本原因
安装anaconda之后,很多默认的编译器都变成了anaconda自带的了,比如python和gcc等。那么系统中的python安装的东西自然是用不了的,刚开始没发现这个问题,一怒之下就把opencv给卸载了,当发现这个问题的时候,已经悔之晚矣,无奈重新安装。
注:opencv编译失败之后,其前面肯定有失败报错的地方,也就是解决问题和核心了,如上图中最后报错“Makefile:160: recipe for target ‘all’ failed”无法锁定问题在那儿,往上翻番看就能发现问题的原因,在继续解决就行了。
解决方案
通过一股查找之后,在博主(
https://stackoverflow.com/questions/40322301/compile-opencv-3-on-ubuntu-16-04-linking-error-usr-lib-x86-64-linux-gnu-libsox)中找到答案。
两种方式:
第一种方法:
增加 -D WITH_OPENMP=ON
第二种方法
从系统变量中删除Anaconda路径sudo gedit ~/.bashrc
注释掉如下两行
#export PATH="/home/lab/SOFT_APP/Anaconda2/bin:$PATH"#export PATH="/home/lab/SOFT_APP/Anaconda2/bin:$PATH"
立即生效:
source ~/.bashrc
此时在编译即可。
Anaconda该怎么使用
有些同学可能会问删除了Anaconda的环境变量之后怎么用,其实直接在Anaconda的目录下就可以使用:
bin/conda info -esource bin/activate tf_v0.12.0rc0source bin/deactivate
同样可以使用
阅读全文
1 0
- Makefile:160: recipe for target 'all' failed (Ubuntu 16.06 + Opencv3.2)解决办法
- opencv recipe for target 'all' failed解决
- Makefile:944: recipe for target 'drivers' failed
- makefile:5: recipe for target ' ' failed
- Apache2 安装错误 recipe for target 'all-recursive' failed
- ERROR: Makefile:1385: recipe for target 'checkarmreloc' failed
- Makefile:2203: recipe for target 's-attrtab' failed
- go-ethereum 1.6 Makefile:15: recipe for target 'geth' failed
- Ubuntu16.04下make all编译caffe时recipe for target '.build_release/.linked' failed
- 【caffe install】recipe for target 'xxx' failed
- recipe for target 'doc/cpp.info' failed
- /opt/linux/linux-3.5/scripts/kconfig/Makefile:21: recipe for target 'menuconfig' failed错误
- 编译BusyBox时scripts/Makefile.build:197: recipe for target 'loginutils/passwd.o' failed
- Makefile:588: recipe for target '.build_release/cuda/src/caffe/layers/softmax_loss_layer.o' failed
- Makefile:134007: recipe for target '.obj/release-shared/qimage_neon.o' failed
- 交叉编译openssh出现错误Makefile:548: recipe for target 'install_sw' failed
- 解决u-boot 2016.11 ”ERROR: Makefile:1385: recipe for target 'checkarmreloc' failed”
- ubuntu编译android6.0错误recipe for target 'out/host/linux-x86/obj/lib/libart.so' failed
- hog matlab代码1——实现hog+svm图像二分类
- 学习springmvc的第十天(保存)
- AngularJS-1-helloworld
- ubuntu 16.04 搭建 pptp vpn
- 六.scrapy crawlspider
- Makefile:160: recipe for target 'all' failed (Ubuntu 16.06 + Opencv3.2)解决办法
- VC++常用命名法和宏定义
- 设计模式->行为型模式->状态模式
- iOS之一则形象说明,完美诠释内存管理机制
- Java常量的探索
- 浅谈协方差矩阵
- 马里奥派对
- Python中的列表方法
- AngularJS—拦截器和好棒的例子