Spring Tool Suite 3.6.1 won't update

2019-04-19 08:28发布

问题:

Updating the Spring Tool Suite in Eclipse Luna, I get the following error since I turned off the option to download updates for Eclipse 3.7:

**An error occurred while collecting items to be installed session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.springsource.ide.eclipse.commons.quicksearch,3.6.1.201408250654-RELEASE
No repository found containing: osgi.bundle,org.springsource.sts,3.6.1.201408250824-RELEASE
No repository found containing: org.eclipse.update.feature,org.springsource.ide.eclipse.commons.quicksearch.feature,3.6.1.201408250654-RELEASE
No repository found containing: org.eclipse.update.feature,org.springsource.sts,3.6.1.201408250824-RELEASE
No repository found containing: binary,org.springsource.sts.ide.executable.win32.win32.x86_64,3.6.1.201408250824-RELEASE-e43
No repository found containing: org.eclipse.update.feature,org.springsource.sts.package,3.6.1.201408250824-RELEASE-e43
No repository found containing: binary,org.springsource.sts.package_root,3.6.1.201408250824-RELEASE-e43**

The version I have installed is:

Spring Tool Suite 
Version: 3.6.0.RELEASE
Build Id: 201407101106
Platform: Eclipse Luna (4.4)**

Does anyone know how to fix this?

回答1:

The first bullet point from Martin's answer fixed my issue. I had multiple update sites for SpringSource, including e3.7, e4.3, and e4.4. Steps I took to fix this:

  1. Select Window -> Preferences from menu
  2. Expand Install/Update and select Available Software Sites
  3. Uncheck update sites for SpringSource, except e4.4, and save

To test the fix:

  1. Select Help -> Check for Updates

Hope this helps. Thanks Martin for pointing this situation out.



回答2:

It looks like there is some stale data in the p2 repository cache of Eclipse/STS. I would recommend to do the following:

  • make sure that you have the 4.4-based update site of STS only (among the Eclipse Luna one), but not another STS update site for a different Eclipse version.
  • go to the main STS directory and delete the content of "p2/org.eclipse.equinox.p2.repository/cache" while STS is NOT running.
  • restart

This should remove the stale data and you should be able to continue with STS updates (to 3.6.1, for example).



回答3:

Steps I took to fix this :

  1. Close STS
  2. Delete folder cache on sts-3.6.0.RELEASE\p2\org.eclipse.equinox.p2.repository
  3. Run STS
  4. Select Window -> Preferences
  5. Expand Install/Update and select Available Software Sites
  6. Uncheck all update site, Except http://download.eclipse.org/releases/luna and save
  7. Select Help -> Check for updates
  8. Select Window -> Preferences
  9. Expand Install/Update and select Available Software Sites
  10. Check http://dist.springsource.com/release/TOOLS/update/e4.4/ and save
  11. Select Help -> Check for updates

If u got error "STS.exe", just remove (backup first) STS.exe, and check for updates again.



回答4:

Below is what worked for me, I'm using STS 3.7.3 Release:

First go to Window -> Preferences -> Install/Update -> Available Software sites -> Uncheck all the SpringSource Update Site for Eclipse boxes.

Then go to Help -> Check for Updates and you should now see all the updates except the one that says Spring Tool Suite. Install them if you need or ignore. Then you can follow the next steps.

From the STS download site (https://spring.io/tools/sts/all), I got the current update site link which under Update Sites: http://dist.springsource.com/release/TOOLS/update/e4.6/

Go to -> Help -> Install New Software -> Add this link in the Work with field and enter. Then Select All or whatever you need and Finish. It will ask to restart STS and you are done.

Update: This is for version 3.8.1 in C:\Users\\Documents\New\STS at this location and when I update I didn't have any issues. If you install (unzip) STS in C directly may be then you might have this issue.

If you choose to re-install, it's better to install in Documents or if you have any other drive than C:\ to avoid such issues and spending time resolving it.

Although the question asked is for 3.6.1 I think it's for all versions.



回答5:

I had the same problem and all the suggestions above didn't work for me. I stumbled on the solution by

Windows/Available Software in STS.

I noticed that the drop down on Available Software was empty and expanded the drop down to select "SpringSource Update Site for Eclipse 4.5 - http://dist.springsource.com/release/TOOLS/update/e4.5"

I selected all and completed the update and everything was fine after restart.