资源
qt5.14.1:qt5.14.1.run
opencv4.5.5:opecv4.5.5压缩包
1.国内换中科大源,加快下载速度
cd /etc/apt/
sudo gedit sources.list
替换成如下内容
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
保存
打开命令行
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
2.ARM扩大SWAP分区
1)
cd /opt
sudo mkdir image
cd image
sudo touch swap
sudo dd if=/dev/zero of=/opt/image/swap bs=1024 count=2048000
sudo mkswap /opt/image/swap
sudo swapon /opt/image/swap
#确认新增加的2G交换空间已经生效,使用命令free
free -m
2)
sudo gedit /etc/fstab
#在文件最后加入:
/opt/image/swap /swap swap defaults 0 0
3.第三方库apt安装
sudo apt-get install build-essential
sudo apt-get install uuid-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
sudo apt-get install git build-essential linux-libc-dev libusb-1.0.0-dev libusb-dev libudev-dev mpi-default-dev openmpi-bin openmpi-common libeigen3-dev libqhull* libgtest-dev freeglut3-dev pkg-config libxmu-dev libxi-dev mono-complete openjdk-8-jdk openjdk-8-jre
sudo apt-get install libopenni-dev
sudo apt-get install libopenni2-dev
sudo apt-get install libflann-dev
sudo apt-get install libjasper-dev
遇到:
ubuntu@ubuntu:~$ sudo apt-get install libjasper-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package libjasper-dev
解决:
sudo add-apt-repository “deb http://security.ubuntu.com/ubuntu xenial-security main”
sudo apt update
sudo apt install libjasper1 libjasper-dev
//QT
chmod +x qt-opensource-linux-x64-5.14.1.run
./qt-opensource-linux-x64-5.14.1.run
//boost
sudo apt-get install libboost1.65-dev
//pcl vtk
sudo apt-get install libpcl-dev
//安裝opencv4.5.5
sudo apt-get install libeigen3-dev
sudo ln -sf /usr/include/eigen3/Eigen /usr/include/Eigen
sudo ln -sf /usr/include/eigen3/unsupported /usr/include/unsupported
sudo apt-get install cmake-qt-gui
unzip opencv-4.5.5.zip
cd opencv-4.5.5/
mkdir build
cmake-gui
选择目录,点击Configure
![在这里插入图片描述](https://img-blog.csdnimg.cn/6e6a680693444211b0532ad5f91e52f3.png
点击Configure
然后点击Generate
回到命令行
cd build
make -j4
sudo make install