官方下载说明:Caffe | Installation: Ubuntu

在 ubuntu 的一些较新版本中(14.04 以上),caffe 的所有依赖包都可以使用 apt-get 大法搞定。

1. 依赖项的安装

如果没有使用 root 账号,则每个命令前需要加 sudo

  • sudo apt-get install git
  • sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
  • sudo apt-get install –no-install-recommends libboost-all-dev
  • sudo apt-get install libatlas-base-dev
  • sudo apt-get install python-dev
  • sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

2. 使用 git 下载 caffe 源码

$ git clone https://github.com/bvlc/caffe.git
$ cd caffe/
$ mv Makefile.config.example Makefile.config

3. 编译

GPU 的配置稍显麻烦,以后给出,这里我们仅将环境设为 CPU_ONLY,具体做法修改 Makefile.config,打开 CPU_ONLY 选项即可。

$ make -j

4. 编译时可能发生的错误及解决方案

  • ./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory

    • 修改 Makefile.config 的 INCLUDE_DIRS 选项,也即增加 /usr/include/hdf5/serial目录;
    • 修改 Makefile 文件的 LIBRARIES 选项,将末尾的:
      • hdf5_hl 修改为 hdf5_serial_hl
      • hdf5 修改为 hdf5_serial
  • g++: internal compiler error: Killed (program cc1plus)

ubuntu 下 caffe 的安装的更多相关文章

  1. CAFFE(三):Ubuntu下Caffe框架安装(仅仅Caffe框架安装)

    步骤一. 从github上下载(克隆)安装包 1.1 在你要安装的路径下 clone 此处我直接安装到home目录,执行: ~$ cd ~ 2 :~$ git clone https://github ...

  2. [转]Centos7下caffe的安装

    Centos7下caffe的安装 原文地址:http://blog.csdn.net/s2392735818/article/details/49796017   版权声明:本文为博主原创文章,未经博 ...

  3. Ubuntu下git的安装与使用

    Ubuntu下git的安装与使用 Ubuntu下git的安装与使用与Windows下的大致相同,只不过个人感觉在Ubuntu下使用git更方便. 首先,确认你的系统是否已安装git,可以通过git指令 ...

  4. Ubuntu下Speedtest的安装

    要安装Speedtest,需要先安装apache,参见<Ubuntu下Apache的安装>一文:*(再安装LAMP server,参见<Ubuntu下快速安装LAMP server& ...

  5. Ubuntu下Apache的安装

    Ubuntu下可快速安装LAMP server(Apache+MySQL+PHP5),参见<Ubuntu下快速安装LAMP server>一文. 也可以手动安装Apache.本文介绍如何手 ...

  6. [转]linux14.04下caffe的安装步骤

     linux14.04下caffe的安装步骤   原文地址:http://blog.csdn.net/xiaoyang19910623/article/details/52997481?locatio ...

  7. Linux(Ubuntu)下MySQL的安装与配置

    转自:http://www.2cto.com/database/201401/273423.html 在Linux下MySQL的安装,我一直觉得挺麻烦的,因为之前安装时就是由于复杂的配置导致有点晕.今 ...

  8. ubuntu下的openfire安装、配置、运行

    openfire服务器              Openfire 采用Java开发,开源的实时协作(RTC)服务器基于XMPP(Jabber)协议.您可以使用它轻易的构建高效率的即时通信服务器.Op ...

  9. ubuntu下boost编译安装

    ubuntu下boost编译安装 boost 安装 1.依赖安装 apt-get install mpi-default-dev libicu-dev python-dev python3-dev l ...

随机推荐

  1. Day2:列表、元组

    一.列表 1.定义与访问元素(按索引) #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan list_a = [&quo ...

  2. 洛谷——P3128 [USACO15DEC]最大流Max Flow

    https://www.luogu.org/problem/show?pid=3128 题目描述 Farmer John has installed a new system of  pipes to ...

  3. ZOJ 2770 Burn the Linked Camp 差分约束 ZOJ排名第一~

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1770 题目大意: 陆逊为了火烧连营七百里,派出了间谍刺探敌情,得之刘备的军营以 ...

  4. 用CSS实现阴阳八卦图等图形

    CSS还是比较强大的,可以实现中国古典的"阴阳八卦图"等形状. 正方形 #rectangle { width: 200px; height: 100px; backgrount-c ...

  5. 【22.95%】【hdu 5992】Finding Hotels

    Problem Description There are N hotels all over the world. Each hotel has a location and a price. M ...

  6. ios_webView

    iOS开发中WebView的使用 在AppDelegate.m文件里 view sourceprint" class="item about" style="c ...

  7. 从Set里面取出有序的记录

    Set里面的记录是无序的.假设想使用Set,然后又想里面的记录是有序的,就能够使用TreeSet.而不是HashSet.在使用TreeSet的时候,里面的元素必须是实现了Comparable接口的,T ...

  8. swift学习:自定义Log

    import UIKit /* 总结:1:let file = (#file as NSString).lastPathComponent,#file获取的是打印所在的文件 的全路径,转成NSStri ...

  9. 并查集(disjoint set)的实现及应用

    这里有一篇十分精彩.生动的 并查集详解 (转): "朋友的朋友就是朋友"⇒ 传递性,建立连通关系 disjoint set,并查集(一种集合),也叫不相交集,同时也是一种树型的数据 ...

  10. ZOJ FatMouse' Trade 贪心

    得之我幸,不得,我命.仅此而已. 学姐说呀,希望下次看到你的时候依然潇洒如故.(笑~) 我就是这么潇洒~哈哈. 感觉大家比我还紧张~ 我很好的.真的 ------------------------- ...