树莓派4B Ubuntu18.04不编译,直接拷贝库OpenCV+PCL+VTK+Realsense+Livox
OpenCV 4.5.2+PCL1.8.1+VTK7.1+Realsense+Livox SDK2
安装ubuntu18.04系统暂省略,以下记录过程和遇到的问题:
更新系统
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
问题:ubuntu@ubuntu:~$ sudo apt-get upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
解决:
ubuntu@ubuntu:~$ sudo rm /var/lib/dpkg/lock-frontend
ubuntu@ubuntu:~$ sudo rm /var/lib/dpkg/lock
ps -ef | grep apt
sudo kill -9 xxxx
安装向日葵
安装参考官网,找arm64的qilin版,最好用下面这个链接
下载链接
链接:https://pan.baidu.com/s/1yWuTfhCqMT6hEf9d-Xoa7Q?pwd=dh4t
提取码:dh4t
sudo dpkg -i 文件名.deb
拷贝库到新的树莓派设备–是已经在其他树莓派4b编译过的库
下载链接:
链接:https://pan.baidu.com/s/1UVLOPNXQnIsMwR43flHHFQ?pwd=8nk0
提取码:8nk0
目标如下:
安装QT
QT需要安装 ,Ubuntu18 默认安装的QT5.9.5 对应VTK显示用的是QVTKWidget控件
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install aptitude
sudo apt install -y g++
sudo apt install -y cmake
sudo apt install -y make
sudo apt install -y wget unzip
sudo apt-get install qt5-default //安装默认基本库
sudo apt-get install qtcreator //注意:有时候报libc版本冲突问题,建议换回默认源
sudo apt-get install qtdeclarative5-dev //安装QtQuick
sudo apt-get install qtmultimedia5-dev //安装QtMultimedia
sudo apt-get install libqt5sql5-mysql //安装QtMySQL
sudo apt-get install libqt5charts5-dev //安装Qtchart
RealSense OpenCV4.5.2 PCL1.8.1 VTK7.1 LIVOX都是直接拷贝库
VTK
QVTKWidget添加到QtCreator
sudo find / -name libQVTKWidgetPlugin.so
复制到 /usr/lib/aarch64-linux-gnu/qt5/plugins/designer/
安装拷贝库
问题
/usr/bin/ld: warning: libQt5X11Extras.so.5, needed by /usr/local/lib/libvtkGUISupportQt-7.1.so.1, not found (try using -rpath or -rpath-link)
/usr/local/lib/libvtkGUISupportQt-7.1.so.1: undefined reference to QX11Info::display()@Qt_5’
undefined reference to QX11Info::display()
sudo apt install libqt5x11extras5-dev
编译QT程序
问题1
cannot create file ,pro.user:Permission denied
解决
sudo chmod 777 ......
问题2
unknown module in QT:datavisualization
暂未解决,暂时不使用这个Module
问题3.0
libpcap.so.1 编译出错
这次是安装libibverbs的时候解决的(见问题3.1)
问题3.1
warning libopenni2.so.0 needed by /usr… not found (try using -rpath or -rpath-link)
warning libopenni.so.0 needed by /usr… not found (try using -rpath or -rpath-link)
warning libNxlib64.so needed by /usr… not found (try using -rpath or -rpath-link)
warning libflann_cpp.so needed by /usr… not found (try using -rpath or -rpath-link)
warning libibverbs.so.1 needed by /usr… not found (try using -rpath or -rpath-link)
解决1
安装基本库–有点用。主要是安装flann 和openni 和libibverbs
sudo apt-get install libflann1.9 libflann-dev
sudo apt-get install libopenni-dev
sudo aptitude install libibverbs1
sudo aptitude install libibverbs-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 mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install libflann1.9 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libvtk6.3-qt libvtk6.3 libvtk6-dev
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mono-complete
sudo apt-get install openjdk-8-jdk openjdk-8-jre
解决2–没啥用
1)安装ensensor
下载安装包并安装。下载链接如下
Ensenso SDK Download
www.optonic.com/en/support/download/ensenso-sdk/
2)安装codemeter下载链接如下
www.wibu.com/support/user/user-software.html
选择linux arm64版本
Download runtime software for Wibu-Systems products - CodeMeter, WibuKey: Wibu-Systems
sudo dpkg -i ensenso-sdk-2.2.147-x64.deb
sudo dpkg -i codemeter_6.80.3312.500_amd64.deb
sudo apt-get -f install
libibverbs:有用
sudo aptitude install libibverbs1
sudo aptitude install libibverbs-dev
没用
sudo aptitude install 以下没用
libnx-x11-dev libnx-x11-6 libnx-x11-6-dev libnxml-abi-0.18.3
libnxt libnxcl-bin libnxml0 libnxcl-dev libnxml0-dbg libnxml0-dev libnxcl1v5
没办法,只能拷贝过去了,到usr/lib,以下几个–有用
稍微注意一下etc/ld.so.conf.d的库引入,不确定是否有用
文件权限
sudo nautilus