查找包

aptitude search pkgName

pkgName可以有多个(空格分隔)

ffmpeg

sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
sudo apt-get update
sudo apt-get install ffmpeg

编译安装opencv和opencv contrib 以及python接口

罗嗦版:http://www.cnblogs.com/zjutzz/p/6714490.html

mkdir -p ~/work/gitdown
cd $_
git clone https://github.com/opencv/opencv
git clone https://github.com/opencv/opencv_contrib
cd opencv
mkdir build
cd build
cmake \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv-git-master \
-D WITH_CUDA=OFF \
-D WITH_VTK=OFF \
-D WITH_MATLAB=OFF \
-D BUILD_DOCS=ON \
-D OPENCV_EXTRA_MODULES_PATH=/home/chris/work/gitwhat/opencv_contrib/modules \
-D PYTHON2_EXECUTABLE=/usr/bin/python \
-D PYTHON3_EXECUTABLE=/usr/bin/python3 \
-D PYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7 \
-D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so \
-D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include/ \
-D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3.5/dist-packages/numpy/core/include/ \
..

期间容易出现ippicv等第三方包下载不下来的情况。找到对应的.cmake文件,把下载地址拼接出来自行下载,注意替换掉md5的hash值。下载的文件放到<opencv_root>/.cache目录下,例如:

.cache
├── ippicv
│   └── 1469ff5ced054be500921d2d46278ef4-ippicv_linux_20151201.tgz
├── protobuf
│   └── bd5e3eed635a8d32e2b99658633815ef-protobuf-cpp-3.1.0.tar.gz
├── tiny_dnn
│   └── adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz
└── xfeatures2d
├── boostdesc
│   ├── 0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
│   ├── 0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
│   ├── 202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
│   ├── 232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
│   ├── 324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
│   ├── 98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
│   └── e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
└── vgg
├── 151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
├── 7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
├── 7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
└── e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i

新编译出来的cv2.so位于/usr/local/opencv-git-master/lib/cv2.so

sudo apt-get remove python-opencv
sudo ln -sf /usr/local/opencv-git-master/lib/python2.7/dist-packages/cv2.so /usr/lib/python2.7

或者设定PYTHONPATH也可以

编译安装protobuf3.2

apt装的protobuf是2.5版本. pip装的protobuf是3.2版。 使用了python layer的网络,如果用tools/caffe.cpp编译出的工具build/caffe来执行网络,会报protobuf版本问题,需要protobuf-cpp的版本装3.2版

编译装protobuf3.2

卸载apt的protobub

sudo apt-get remove --purge libprotobuf-dev

如果你是ubuntu-desktop用户,那你的桌面有可能被误删。立即安装(不要重启):

sudo apt-get install ubuntu-desktop -y
sudo apt-get install unity -y
sudo apt-get install compiz-gnome -y
sudo apt-get install libcompizconfig0 -y

静态编译protobuf(产生libprotobuf.a而不是.so文件,否则caffe编译会报错)

sudo apt-get install autoconf automake libtool curl make g++ unzip
cd ~/work/gitdown
git clone https://github.com/google/protobuf
git checkout -b 3.2.x origin/3.2.x
cd protobuf vim configure

修改2658行和2661行,引号里面都换成"-fPIC"

./autogen.sh
./configure --disable-shared
make -j8
sudo make install

sudo ldconfig

重新编译caffe

cd ~/work/caffe-BVLC
make clean
make -j8
make pycaffe

android-studio

真机调试:需要先设定udev的规则。

参考:http://www.jianshu.com/p/958361328ae5

exfat无法挂载?

sudo apt-get install exfat-utils

flash

sudo apt-get install flashplugin-installer

refs

http://blog.csdn.net/linyushan11/article/details/10378419

https://github.com/BVLC/caffe/issues/19

ubuntu装软件包的更多相关文章

  1. Ubuntu装完后要做的几件事

    Ubuntu装完后要做的几件事 改hosts 无论哪里,改hosts都是第一件事,没hosts咋google.没google咋活.在终端输入命令 sudo gedit /etc/hosts在# The ...

  2. CentOS 与Ubuntu 安装软件包的对比

    工作需要开始转向centos,简单记录软件包安装 wget不是安装方式 他是一种下载软件类似与迅雷 如果要下载一个软件 我们可以直接 wget 下载地址 ap-get是ubuntu下的一个软件安装方式 ...

  3. 双系统 ubuntu装完系统后 丢失原win系统启动项

    sudo update-grub 可以尝试以上命令 注意这里是先装的win 后装的ubuntu

  4. CentOS/ubuntu/Solaris软件包安装

    一.CentOS/Red Hat yum = Yellow dog Updater, Modified     (1)yum配置文件      (在CentOS下,默认安装yum,无须配置即可使用) ...

  5. Ubuntu之软件包管理 (最全最精)

    Centos与Ubuntu的关系 * CentOS之前的地位:Fedora稳定版-->发布-->RHEL稳定版-->发布-->CentOS * CentOS如今的地位:Fedo ...

  6. ubuntu 查看软件包版本以及软件包的源码

    aptitude show  xxx sudo apt-cache show autoconf setattr, getattr, setattr http://ju.outofmemory.cn/e ...

  7. 怎么解决 ubuntu 装kde桌面遇到的汉化问题

    正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 现在没有可用的软件包 language-pack-kde-zh,但是它被其它的软件包引用了.这可能意味着这个缺失 ...

  8. Ubuntu常用软件包管理命令

      1.查看软件包xxx安装内容 #dpkg -L xxx  例子: #dpkg -L binutils    //查看安装binutils包会安装哪些文件   2.列出系统已安装的或指定deb包的安 ...

  9. VMWare安装Ubuntu装完之后安装VMtools

    今天搭建Hadoop环境,在虚拟机中安装了Ubuntu系统,但是Windows系统不能给虚拟机系统传输文件,很是不方便.在网上找了很久,也是过了很多办法,但是下面的方式是可行的,希望对读者有帮助. 第 ...

随机推荐

  1. Linux命令之rmdir

    rmdir命令 用处:删除文件夹 用法:在终端中输入rmdir加上要删除的文件夹的名字 示例: (我要删除shuyunquan这个文件夹)

  2. Codeforces 15 E. Triangles

    http://codeforces.com/problemset/problem/15/E 题意: 从H点走下去,再走回H点,不能走重复路径,且路径不能把黑色三角形包围的方案数 中间的黑色三角形把整张 ...

  3. Prim算法:最小生成树

    #define _CRT_SECURE_NO_WARNINGS /* 7 10 0 1 5 0 2 2 1 2 4 1 3 2 2 3 6 2 4 10 3 5 1 4 5 3 4 6 5 5 6 9 ...

  4. TCP网络协议通信原理(客户端和服务器端)

    下面直接用代码来说明TCP协议的基础知识: 服务器端代码块: from socket import * from time import ctime ''' 指定主机地址.工作端口号.接收缓存的长度 ...

  5. Shiro+Spring+SpringMVC+Mybatis整合

    Demo源码地址,v1.0分支 https://github.com/jxjy/hr

  6. Keil MDK忽略警告:文件末尾空白行警告

    使用Keil MDK调试程序的时候,没有习惯在每个文件的末尾增加一个空白行,结果文件一多,编译时产生的警告就一大堆,排错都得用滚轮滚好久,就一个空白行还得出警告,烦死了,烦死了,烦死了!实在受不了了, ...

  7. Debian 无线网卡驱动问题

    参考这里:https://wiki.debian.org/iwlwifi Debian 9 "Stretch" Add a "non-free" compone ...

  8. np.mat()和np.transpose

    例子: import numpy as np dataSet = [] with open('/home/lai/下载/20081023025304.plt') as fr: for line in ...

  9. js实现页面遮罩层,并且阻止页面body滚动

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  10. Windows下 Robhess SIFT源码配置

    Robhess OpenSIFT 源码下载:传送门 为了进一步学习SIFT,选择论文就着代码看,在VS2013.OpenCV2.4.13下新建项目,跑一跑经典之作.由于将代码和Opencv配置好后还会 ...