Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

qt5 - How to update component in Qt 5.2.1+?

I see this message:

at least one valid and enable repository required for this action to succeed

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...

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

question from:https://stackoverflow.com/questions/22775906/how-to-update-component-in-qt-5-2-1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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: ."

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"/>

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...