无人机开发学习(1)

1.Ubuntu20 安装QGC
 

sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager -y

遇到的问题:

 E: 无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 2973(unattended-upgr)持有
N: 请注意,直接移除锁文件不一定是合适的解决方案,且可能损坏您的系统。
E: 无法获取 dpkg 前端锁 (/var/lib/dpkg/lock-frontend),是否有其他进程正占用它?

解决方案: 

sudo rm /var/lib/dpkg/lock-frontend 


sudo rm /var/lib/dpkg/lock

 

 

 

 

sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y

遇到的问题:

        源无法连接

解决方案:

        更换源

        

(1)备份源文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

(2)编辑新源文件

sudo rm -rf /etc/apt/sources.list
sudo nano /etc/apt/sources.list

 

在文件输入:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

(3)更新源文件 

sudo apt-get update

 

 

 

 

 

 

 

 

 

 

  

 

解决完成后,继续安装

在Ubuntu中用firefox浏览器打开网页,并下载安装包。

然后在根目录下mkdir创建QGroundControl文件夹,并将下载的安装包移动到该目录下。

继续

chmod +x ./QGroundControl.AppImage
./QGroundControl.AppImage  (or double click)

 

发现需要安装QT环境

(1)去qt官网下载开源版安装包

网址:获取Qt —— 立即下载您可以借助Qt用一项技术和一套代码库在不同平台上创建、部署流畅、高性能、直观的UI、应用及嵌入式设备,从而最大限度地减少上市时间和减轻维护成本。Qt有两种许可证,请根据您的项目需求选择适合的版本。https://www.qt.io/zh-cn/download

(2)给安装包权限,否则可能无法打开安装包

chmod a+x qt-unified-linux-x64-4.2.0-online.run

(3)打开执行安装包 

sudo ./qt-unified-linux-x64-4.2.0-online.run

(4)安装路径,我选择安装在/opt/QT

(5)安装的组件包/components,我选择的是5.15.2版本中的 Desktop gcc 64-bit 和 QT Charts

(6)打开用户目录并在.bashrc中写入

cd 


export PATH="/opt/Qt/Tools/QtCreator/bin:$PATH"
export PATH="/opt/Qt/5.15.2/gcc_64/bin:$PATH"
export LD_LIBRARY_PATH=/opt/Qt/5.15.2/gcc_64/lib:$LD_LIBRARY_PATH

(7)生效刚才编辑的bashrc

source ~/.bashrc

(8)运行

qmake -v

得到

QMake version 3.1
Using Qt version 5.15.2 in /opt/Qt/5.15.2/gcc_64/lib
 

                                                                                                                                                                                                                                                                                                                

继续安装

遇到的问题

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)
 

解决方案:

sudo apt-get install libxcb-xinerama0

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值