200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > win10家庭版+ubuntu20.04虚拟机+Qt5.9.0开发环境搭建

win10家庭版+ubuntu20.04虚拟机+Qt5.9.0开发环境搭建

时间:2019-05-28 00:03:52

相关推荐

win10家庭版+ubuntu20.04虚拟机+Qt5.9.0开发环境搭建

1. win10家庭版创建ubuntu20.04虚拟机

win10家庭版创建ubuntu20.04虚拟机,无法使用低于16.1.2的版本,因为win10家庭版与低版本VMware专业版不兼容,启动虚拟机时win10家庭版直接蓝屏重启。

官网下载 VMware-workstation-full-16.1.2-17966106.exe,激活码随便找

官网下载 ubuntu-20.04.2.0-desktop-amd64.iso

2. 安装qt5.9.0

官网下载 qt-opensource-linux-x64-5.9.0.run

修改权限:sudo chmod +x qt-opensource-linux-x64-5.9.0.run

安装:sudo ./qt-opensource-linux-x64-5.9.0.run

安装后,新建项目编译时报错“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”

需要手动安装编译器。

3. 修改使用清华源

官网下载的镜像安装编译器总是提示各种问题,如下:

Reading package lists… Done

Building dependency tree

Reading state information… Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

build-essential : Depends: libc6-dev but it is not going to be installed or

libc-dev

Depends: gcc (>= 4:4.4.3) but it is not going to be installed

Depends: g++ (>= 4:4.4.3) but it is not going to be installed

E: Broken packages

3.1修改/etc/apt/sources.list,将原内容替换为以下内容(来自/qq_43158436/article/details/108990925)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb https://mirrors.tuna./ubuntu/ focal main restricted universe multiverse# deb-src https://mirrors.tuna./ubuntu/ focal main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ focal-updates main restricted universe multiverse# deb-src https://mirrors.tuna./ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ focal-backports main restricted universe multiverse# deb-src https://mirrors.tuna./ubuntu/ focal-backports main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ focal-security main restricted universe multiverse# deb-src https://mirrors.tuna./ubuntu/ focal-security main restricted universe multiverse# 预发布软件源,不建议启用# deb https://mirrors.tuna./ubuntu/ focal-proposed main restricted universe multiverse# deb-src https://mirrors.tuna./ubuntu/ focal-proposed main restricted universe multiverse

3.2 sudo apt update

3.3 sudo apt upgrade

4. 安装编译环境

sudo apt-get install build-essential

5. Qt项目编译

报错 error: cannot find -lGL

执行 sudo apt-get install libgl1-mesa-dev

6. 大功告成

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。