ubuntu裝軟體包

2021-09-07 10:34:07 字數 3742 閱讀 9491

aptitude search pkgname
pkgname可以有多個(空格分隔)

sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next 

sudo apt-get update

sudo apt-get install ffmpeg

羅嗦版:

mkdir -p ~/work/gitdown

cd $_

git clone

git clone _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/ \

..

.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也可以

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

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

真機除錯:需要先設定udev的規則。

參考:

sudo apt-get install exfat-utils
sudo apt-get install flashplugin-installer

ubuntu裝軟體包

aptitude search pkgnamepkgname可以有多個 空格分隔 sudo add apt repository ppa kirillshkrogalev ffmpeg next sudo apt get update sudo apt get install ffmpeg羅嗦版 m...

Ubuntu離線安裝軟體包

b.需要安裝軟體的ubuntu不能上網 1.根目錄下新建乙個資料夾 sudo mkdir offlinepackage sudo cp r var cache apt archives offlinepackage 3.修改資料夾的許可權,可讀可寫可執行 sudo chmod 777 r offli...

ubuntu 徹底刪除軟體包

找到此軟體名稱,然後sudo apt get purge 點點為為程式名稱 purge引數為徹底刪除檔案,然後sudo apt get autoremove,sudo apt get clean和dpkg l grep rc awk sudo xargs dpkg p 兩條命令來清除殘餘的配置檔案追...