如何将Linux中安装的Qt从一个版本升级到更高版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12600661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 14:27:00  来源:igfitidea点击:

How to upgrade Qt installed in linux from one version to higher

linuxqtubuntuqt4upgrade

提问by spin_eight

While porting Qt project from windows to linux(ubuntu) i faced with the following issue:

在将 Qt 项目从 windows 移植到 linux(ubuntu) 时,我遇到了以下问题:

on windows Qt version 4.8.1is installed on linux 4.6.3in which some functionalities availiable in higer version 4.8.1 don`t yet implemented(ex. QUdpSocket::joinMultiCastGroup).

Windows 上 Qt 4.8.1 版安装在linux 4.6.3 上,其中一些在更高版本 4.8.1 中可用的功能尚未实现(例如QUdpSocket::joinMultiCastGroup)。

I see only one solution to this problem: upgrade Qt version on linux to 4.8.1. How can I do this?

我只看到这个问题的一个解决方案:将 linux 上的 Qt 版本升级到 4.8.1。 我怎样才能做到这一点?

On linux I got installed libqt4-dev, qmake.

在 linux 上,我安装了 libqt4-dev,qmake。

采纳答案by spin_eight

Solved: I changed repositoryfrom squeeze (stable) to wheezy(testing), in wheezy latest Qt version is 4.8.1, which is perfectly suits my needs.

解决:我将存储库从squeeze (stable)更改wheezy(testing),在wheezy 中最新的Qt 版本是4.8.1,非常适合我的需求。

Using package managerI found package libqt4-devand selected it for update. That is all, the whole process took 5 minutes.

使用包管理器,我找到了包 libqt4-dev并选择了它进行更新。就是这样,整个过程用了5分钟。

Disadvantages:- As I run Debian on Virtual Box after changing repository I had to reinstall guest additions - wheezy is less stable than squeeze (I haven`t faced yet with stablilty problem)

缺点:- 当我在更改存储库后在 Virtual Box 上运行 Debian 时,我不得不重新安装来宾添加 - wheezy 不如挤压稳定(我还没有遇到稳定性问题)

回答by Herr von Wurst

This depends on the distro you are using. If there are binary packages for your distro you can update through your package manager. Otherwise you have to download the source of your prefered Qt version and build it yourself.

这取决于您使用的发行版。如果您的发行版有二进制包,您可以通过包管理器进行更新。否则,您必须下载您喜欢的 Qt 版本的源代码并自行构建。

回答by Dmitry Stukalov

  1. I guess you can use Upgrade option in the Qt Creator.
  2. Or you can download latest version from Download Qt, the cross-platform application framework
  3. Or you could try to update using something like apt-get install(upgrade) libqt4-devif you using Debian based system.
  1. 我想您可以在 Qt Creator 中使用升级选项。
  2. 或者您可以从跨平台应用程序框架Download Qt下载最新版本
  3. 或者您可以尝试使用类似的东西进行更新,apt-get install(upgrade) libqt4-dev如果您使用基于 Debian 的系统。

回答by jwbradley

I'm not sure if this will help in your situation, but you can download the Qt Online Installer at the following link:

我不确定这对您的情况是否有帮助,但您可以通过以下链接下载 Qt 在线安装程序:

https://www.qt.io/download-qt-installer

https://www.qt.io/download-qt-installer