本文介绍了如何在 Qt 5.2.1+ 中更新组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到这条消息:

此操作所需的至少一个有效且启用的存储库成功

每当我尝试更新 Qt 5.2.1 中的组件时.

whenever I try to update components in Qt 5.2.1.

我知道这是一个报告的错误(看看这里此处) 但我想知道是否有人想出了解决方案...

I know it is a reported bug (take a look here and here) but I was wondering if anybody came up with a solution...

我在 Windows 8 x64 机器上运行 Qt 5.2.1.

I'm running Qt 5.2.1 on a Windows 8 x64 machine.

推荐答案

我刚刚为 Windows 下载了一个全新的 Qt 5.5(通过在线安装程序)并遇到了这个问题.我也在 5.4 中发生过,原因不明,不记得我是如何修复它的.

I just downloaded a fresh Qt 5.5 (via online installer) for Windows and ran into this problem. I also had it occur in 5.4, for unknown reasons and don't remember how I fixed it.

但是,这次我能够修复它并记下了.使用另一个答案中的 URL 只对我有用.它可以让我删除项目,但不能更新或添加新项目.尝试更新只是给了我错误无法检索远程树:."

But, this time I was able to fix it and I took note. Using the URL in the other answer only sort of worked for me. It would let me remove items but not update or add new items. Attempting to update just gave me the error "Could not retrieve remote tree: ."

将 URL 添加到存储库对话框的临时/用户定义的添加项时,我注意到错误的 URL 失败并出现错误提及 update.xml.所以,我看了一下:http://download.qt.io/online/qt5/windows/x86/online_repository/Updates.xml

When adding URLs to temporary/user-defined additions to the repository dialog, I noticed that bad URLs failed with an error mentioning update.xml. So, I took a look at: http://download.qt.io/online/qt5/windows/x86/online_repository/Updates.xml

并注意到另外两个网址:

and noticed two additional URLs:

<Repository action="add" url="http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/tools_maintenance" displayname="Qt Windows-x86 Maintenance Tool online repository"/>
<Repository action="add" url="http://download.qt-project.org/online/qtsdkrepository/windows_x86/root/qt" displayname="Qt Windows-x86 Root online repository"/>

第一个是解决方案(必须使用非 x86 系统的 URL 过期):http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/tools_maintenance

The first one being the solution (will have to expirement with the URL for non-x86 systems): http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/tools_maintenance

将其添加为存储库(如果需要,请检查并替换平台部分),选择更新,它应该有望更新维护工具(在我的情况下,我猜我的离线安装已经足够旧了).

Add that as the repo (check and replace the platform portion if needed), select update and it should hopefully update the maintenance tool (it did in my case, I guess my offline install was old enough).

完成后,退出应用程序(不要选择重启,因为这似乎会重启旧版本),然后再次打开它.

Once complete, exit the application (do not select restart as that seems to restart the old version), and open it up again.

一旦我这样做了,所有的默认存储库都被添加了.

Once I did that, all the default repos were added.

第二个 URL (http://download.qt-project.org/online/qtsdkrepository/windows_x86/root/qt) 似乎是实际的 Qt 分发存储库,我能够通过添加来查询新的添加和更新.所以我想如果没有任何维护工具更新,您可以通过使用该 URL 获得.

The second URL (http://download.qt-project.org/online/qtsdkrepository/windows_x86/root/qt) appears to be the actual Qt distribution repository, and I was able to query for new additions and updates by adding that. So I suppose if there aren't any Maintenance Tool updates you could get by by using that URL.

这篇关于如何在 Qt 5.2.1+ 中更新组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:23