ubuntu时不时老崩溃,记录重要库的安装步骤,以防一遍遍网上搜各种教程。
vtk,pcl,opencv都是源码安装,放在了home下,重装系统后只需apt-get相关的依赖包,将编译好的包make install即可。
sudo sh /home/cbc/下载/cuda_8.0.61_375.26_linux.run
根据提示安装,但是不要选择装显卡驱动!
chmod +x /home/cbc/下载/ZED_SDK_Linux_Ubuntu16_CUDA8_v2.2.0.run
sudo ./home/cbc/下载/ZED_SDK_Linux_Ubuntu16_CUDA8_v2.2.0.run
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt install libpcl-dev
sudo dpkg -i /home/cbc/下载/PCL-1.8.0-Linux.deb
参考
###pcl1.8通过源码安装(目的是为了在qt里用pcl)
sudo apt-get update
sudo apt-get install libboost-all-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libflann1.8 libflann-dev
sudo apt-get install git build-essential linux-libc-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libxt-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install mono-complete
//sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre
//sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev
chmod +x /home/cbc/下载/qt-opensource-linux-x64-5.9.2.run
sudo ./home/cbc/下载/qt-opensource-linux-x64-5.9.2.run
安装在home下面
git clone git://vtk.org/VTK.git//在home目录下
解压缩
mkdir VTK-build&&cd VTK-build//在home目录下
cmake -DVTK_QT_VERSION:STRING=5 -DQT_QMAKE_EXECUTABLE:PATH=/home/cbc/Qt5.9.2/5.9.2/gcc_64/bin/qmake -DVTK_Group_Qt:BOOL=ON -DCMAKE_PREFIX_PATH:PATH=/home/cbc/Qt5.9.2/5.9.2/gcc_64/lib/cmake -DBUILD_SHARED_LIBS:BOOL=ON /home/cbc/VTK-7.1.1
make -j4
sudo make -j4 install
#pcl源码
pcl下载地址
cd /home/cbc/pcl-1.8.1 && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
sudo make -j4 install
cd /home/cbc/opencv-3.2.0
rm -rf build
mkdir build&&cd build
//编译两个包,指明安装位置,默认为/usr/local,指明opencv3.2-contribute模块位置
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DOPENCV_EXTRA_MODULES_PATH=/home/cbc/opencv_contrib-3.2.0/modules/ ..
//只编译opencv3.2
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
//make&安装
make -j4
sudo make -j4 install
set(OpenCV_DIR "/usr/local/opencv320/share/OpenCV/")