AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1117530
Accepted
BlandCorporation
BlandCorporation
Asked: 2019-02-12 18:04:48 +0800 CST2019-02-12 18:04:48 +0800 CST 2019-02-12 18:04:48 +0800 CST

我怎么能在 Ubuntu 16.04 LTS 上安装 Qt5?

  • 772

我有很多需要 Qt4 的程序,我需要安装需要 Qt5 的程序。当我尝试安装 Qt5 时,事情开始变得狡猾,然后变得精神错乱。我请求友好的指导。您可能最容易直接查看终端输出:

$ sudo apt update
Ign:1 http://linux.dropbox.com/ubuntu wily InRelease
Ign:2 http://repo.ubports.com xenial InRelease                                                                  
Hit:3 http://linux.dropbox.com/ubuntu wily Release                                                              
Hit:4 http://gb.archive.ubuntu.com/ubuntu xenial InRelease                                                      
Ign:5 http://repo.ubports.com xenial_-_mir26 InRelease                                                          
Hit:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease                                           
Hit:8 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease                                              
Hit:9 http://repo.ubports.com xenial Release                                                                    
Hit:10 http://security.ubuntu.com/ubuntu xenial-security InRelease                                              
Hit:11 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease                                           
Hit:12 http://repo.ubports.com xenial_-_mir26 Release                                          
Hit:13 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial InRelease
Hit:14 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease          
Hit:15 http://ppa.launchpad.net/nextcloud-devs/client/ubuntu xenial InRelease
Hit:17 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease             
Hit:19 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease
Hit:20 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease
Hit:21 https://updates.signal.org/desktop/apt xenial InRelease
Hit:22 https://riot.im/packages/debian xenial InRelease
Reading package lists... Done 
Building dependency tree       
Reading state information... Done
23 packages can be upgraded. Run 'apt list --upgradable' to see them.

$ sudo apt install qt5-default
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 protonmail-bridge : Depends: libqt5designer5 but it is not going to be installed
                     Depends: libqt5multimediawidgets5 but it is not going to be installed
 qt5-default : Depends: qtbase5-dev
               Depends: qtchooser (>= 55-gc9562a1-1~)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ sudo apt install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 protonmail-bridge : Depends: qt5-default but it is not going to be installed
                     Depends: libqt5designer5 but it is not going to be installed
                     Depends: libqt5multimediawidgets5 but it is not going to be installed
 qtbase5-dev : Depends: libgles2-mesa-dev but it is not going to be installed or
                        libgles2-dev but it is not installable
               Depends: libqt5concurrent5 (= 5.9.5+dfsg-0ubports2) but it is not going to be installed
               Depends: qt5-qmake (= 5.9.5+dfsg-0ubports2)
               Depends: qtbase5-dev-tools (= 5.9.5+dfsg-0ubports2)
               Depends: qtchooser
               Recommends: libqt5opengl5-dev (= 5.9.5+dfsg-0ubports2)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  audacity-data libflac++6v5 liblilv-0-0 libportsmf0v5 libqscintilla2-l10n libqt4-declarative libqt4-network
  libqt4-script libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-xml libqt4-xmlpatterns libqtcore4
  libqtdbus4 libqtgui4 libsbsms10 libserd-0-0 libsord-0-0 libsratom-0-0 libunibreak1 libvamp-hostsdk3v5
  libzlcore-data libzlcore0.13 libzltext-data libzltext0.13 linux-headers-4.15.0-42
  linux-headers-4.15.0-42-generic linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic
  linux-modules-extra-4.15.0-42-generic simplescreenrecorder-lib sqliteman-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  audacity fbreader libqscintilla2-12v5 libqt4-designer libqt4-opengl libqt4-svg libsuil-0-0 libzlui-qt4
  protonmail-bridge simplescreenrecorder sqliteman vidyodesktop
0 to upgrade, 0 to newly install, 12 to remove and 23 not to upgrade.
1 not fully installed or removed.
After this operation, 45.6 MB disk space will be freed.
Do you want to continue? [Y/n] n

我尝试的最终建议将删除我需要的一些核心内容,所以这不是一个选择。我该如何继续,好心的陌生人?

16.04 qt5 pyqt5
  • 1 1 个回答
  • 28969 Views

1 个回答

  • Voted
  1. Best Answer
    VanishingTacos
    2019-02-12T18:34:13+08:002019-02-12T18:34:13+08:00

    清理和更新:

    sudo apt-get autoremove && sudo apt update && sudo apt upgrade
    

    下载 Qt5:

    wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
    

    安装:

    chmod +x qt-opensource-linux-x64-5.7.0.run \
    ./qt-opensource-linux-x64-5.7.0.run
    

    安装 g++:

    sudo apt-get install build-essential
    

    安装通用字体配置库 - 运行时:

    sudo apt-get install libfontconfig1
    

    配置编译器:

    启动Qt Creator。转到工具>选项。单击Build & Run并选择选项卡 Kit。如果未自动检测到编译器,请配置它。

    安装 OpenGL 库:

    sudo apt-get install mesa-common-dev
    

    资源:

    https://wiki.qt.io/Install_Qt_5_on_Ubuntu

    • 7

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve