39

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.

Just Shadow
  • 10,860
  • 6
  • 57
  • 75
Baso
  • 1,354
  • 4
  • 19
  • 41

4 Answers4

35

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.

Nick
  • 4,901
  • 40
  • 61
  • 3
    At last! The solution. Qt configuration is sure fraught with stumbling blocks. This is the repository that worked for me. Thanks! Windows 7, Qt 5 – Iceberg Aug 07 '15 at 17:25
  • This worked for me on Windows as well. On OSX with Qt 5.7, I additionally had to manually edit `network.xml` (in the same path as the maintenance tool) since it put the URL into the `` tag, instead of the `` tag. – Matthew Read Sep 19 '16 at 14:26
28

In the Maintenance Tool, start by selecting "Add or remove components" or "Update components". Then click on the Settings button on the bottom left:

enter image description here

Then a Settings window will open and in there, you need to go into the Repositories tab, click on User defined repositories, click on the Add button and type http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/tools_maintenance.

enter image description here

Now click on OK and restart the maintenance tool and your problem should be solved.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
  • Hey, When I select Update Components and select multiple components to update, How can I dsiplay the online/remote repository name for each component which belongs to remote repository? As of now, It just shows the list of components to update. But these components belong to different remote repositories. How to map the component to remote repository? – user2301 Jul 09 '18 at 08:59
  • @user2301 I don't know. That's a different question though, so you might want to ask it as a new question. – Donald Duck Jul 09 '18 at 16:53
  • 1
    Ignore the other answers. This answer is so much better than any other on here. – lolololol ol Jun 19 '19 at 23:13
  • This answer finally helped me practically on how to fix the error. Thanks! – iammilind May 13 '20 at 04:43
  • you deserve +1 and if there is +2 I would give it to you, many thanks – AAEM Mar 11 '21 at 21:52
11

Ok, I fixed the problem by simply manually adding the Qt online repository in Qt Maintenance Tool's "Settings"...

Qt repositories are at: http://download.qt-project.org/online and I personally added http://download.qt-project.org/online/qt5/linux/x86/online_repository/ (since I am working on a Linux box 32-bit).

Morix Dev
  • 2,700
  • 1
  • 28
  • 49
8

Since the default repos have download speed limitations, you might consider using official mirrors (which have much higher speeds) instead.
To do so, simply go to Settings-> Repositories -> Add and use the following repos for higher speed:

Mac: http://ftp2.nluug.nl/languages/qt/online/qt5/mac/x64/online_repository
Windows: http://ftp2.nluug.nl/languages/qt/online/qt5/windows/x86/online_repository
Linux: http://ftp2.nluug.nl/languages/qt/online/qt5/linux/x86/online_repository

Note: Here is a way of getting the mirrors list just in case it's needed.

Just Shadow
  • 10,860
  • 6
  • 57
  • 75