Eclipse Indigo“无法连接到存储库”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7409691/
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
Eclipse Indigo "unable to connect to repository"
提问by hemdoar
I'm trying to add this repository to Eclipse (Indigo):-
我正在尝试将此存储库添加到 Eclipse (Indigo):-
http://download.eclipse.org/releases/indigo
http://download.eclipse.org/releases/indigo
Seems okay when checked in a browser, but I keep getting "unable to connect" in Eclipse, and when I check the URL Eclipse is apparently looking for:-
在浏览器中检查时似乎没问题,但我在 Eclipse 中一直“无法连接”,当我检查 URL 时,Eclipse 显然在寻找:-
http://download.eclipse.org/releases/indigo/content.xml
http://download.eclipse.org/releases/indigo/content.xml
in a browser, I get a "404 not found". The locations for previous releases (e.g. galileo) don't seem to be there either. Have they moved? Am I misunderstanding something?
在浏览器中,我收到“404 not found”。以前版本(例如伽利略)的位置似乎也不存在。他们搬家了吗?我误解了什么吗?
I tried some of the suggestions in this previous thread:-
我尝试了上一个线程中的一些建议:-
But they don't seem to work (and I'm not using a proxy anyway).
但是它们似乎不起作用(无论如何我都没有使用代理)。
- Hemdoar
- 赫姆多尔
回答by xxjjnn
This worked for me:
这对我有用:
Open terminal. Navigate to Eclipse folder.
打开终端。导航到 Eclipse 文件夹。
sudo nano eclipse.ini
at the bottom, add this line in:
在底部,添加这一行:
-Djava.net.preferIPv4Stack = true
Then ctrl+O to save, ctrl+X to close (it says at bottom). IPv4/IPv6 problems? Solved. Then delete the cache VonC said to:
然后 ctrl+O 保存,ctrl+X 关闭(底部显示)。IPv4/IPv6 问题?解决了。然后删除缓存 VonC 说:
<eclipse>/p2/org.eclipse.equinox.p2.repository/cache
(This can be done using "sudo rmdir /p2/org.eclipse.equinox.p2.repository/cache" or by typing "sudo nautilus" into terminal, to open a root-priveleged filesystem browser, than navigating to, selecting the folder, and pressing the delete key). Then restart eclipse, goto Help>install new software>available software sites
(这可以使用“sudo rmdir /p2/org.eclipse.equinox.p2.repository/cache”或通过在终端中键入“sudo nautilus”来打开根特权文件系统浏览器,而不是导航到,选择文件夹,然后按删除键)。然后重启eclipse,进入Help>install new software>available software sites
Make sure the repos you want (such as "http://download.eclipse.org/egit/updates/") has a "/" right at the end. If it doesn't, delete that entry, and create a new, identical one which does, because Eclipse won't just let you edit it and click ok. Then click ok, and from the combo box choose e.g. the egit link, and lo, it will find it.
确保您想要的存储库(例如“ http://download.eclipse.org/egit/updates/”)在末尾有一个“/”。如果没有,请删除该条目,然后创建一个新的、相同的条目,因为 Eclipse 不会让您编辑它并单击“确定”。然后单击确定,从组合框中选择例如 egit 链接,瞧,它会找到它。
Still not working? Window>show view>internal web browser; check it can access internet. Hope that helps!
还是行不通?窗口>显示视图>内部网络浏览器;检查它可以访问互联网。希望有帮助!
Credit to: http://drfits.com/2011/11/13/eclipse-contacting-software-sites-has-encountered-a-problem/VonC Sep 14 '11 at 6:03
归功于:http: //drfits.com/2011/11/13/eclipse-contacting-software-sites-has-encountered-a-problem/ VonC 2011 年 9 月 14 日 6:03
回答by rockbrain
I used VonC's answer to good effect. I also uninstalled a program called webroot. I think this had something to do with it because other programs were also having network problems.
我使用了 VonC 的答案,效果很好。我还卸载了一个名为 webroot 的程序。我认为这与它有关,因为其他程序也存在网络问题。
回答by Sanjaya Athukorala
This is because windows IPV6 issue. Try adding the following VM option in the eclipse.ini
这是因为 Windows IPV6 问题。尝试在 eclipse.ini 中添加以下 VM 选项
-Djava.net.preferIPv4Stack=true
回答by Asteriskiiii
Can you connect to internet at all through Eclipse?
你能通过 Eclipse 连接到互联网吗?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser. Look up any normal adress, is it working? Can you connect to another update site? Try for example Eclipse Emma: http://update.eclemma.org/Do you see anything there?
打开内部网络浏览器。在 Eclipse 中:窗口 -> 显示视图 -> 其他 -> 常规:内部 Web 浏览器。查找任何正常地址,是否有效?您可以连接到另一个更新站点吗?尝试例如 Eclipse Emma:http: //update.eclemma.org/你在那里看到什么了吗?
What are your proxy preferences? Go to Window -> preferences -> General: Network connections.
您的代理偏好是什么?转到窗口 -> 首选项 -> 常规:网络连接。
The active provider:
主动提供者:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.
指定打开连接时要使用的设置配置文件。选择直接提供程序会导致在不使用代理服务器的情况下打开所有连接。选择 Manual 会导致使用 Eclipse 中定义的设置。在某些平台上,还有一个 Native 提供程序可用,选择此提供程序会导致使用在操作系统中发现的设置。
If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.
如果 Internet 在 Eclipse 之外工作正常,请尝试更改为 Native。之后,尝试直接。
I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
我遇到了无法加载更新站点的问题,然后我不得不将其删除并重新添加。这会强制 Eclipse 重新读取站点的内容,即使它有缓存的副本。因此,如果您仍然无法连接到 Indigo 更新站点,但其他一切正常,请尝试。转到窗口 -> 首选项 -> 安装/更新:可用软件站点。然后删除并添加靛蓝站点。请记住复制地址,以便您可以再次添加。
As suggested in a comment below by @lostiniceland, this is a simpler way to achieve the above:
正如@lostiniceland 在下面的评论中所建议的,这是实现上述目标的一种更简单的方法:
Goto Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins
转到首选项 -> 安装更新 -> 可用软件站点 => 选择条目并单击右侧的“重新加载”按钮。当您有本地更新站点用于测试自定义插件时,这有时也很有用
回答by srangnani
first resolve proxy conflictsand if then too eclipse is not getting connected to internet *turnoff your firewall/antiviru*s and try again
首先解决代理冲突,如果太 eclipse 没有连接到互联网 *关闭您的防火墙/防病毒*s并重试
To resolve proxy conflicts:Go to windows->prefernces-general tab->network settings
解决代理冲突:转到windows->preferences-general tab->network settings
- if you dont use proxy settings, cgange native to direct
- if you use proxy, chenge native to manual and fill details of proxy for http and https by pressing 'edit' and clear SOCKS tab by pressing 'clear'
- 如果不使用代理设置,cgange native to direct
- 如果您使用代理,请通过按“编辑”并按“清除”清除 SOCKS 选项卡来手动填写 http 和 https 代理的详细信息
check if your SOCK is disabled on operating system too. or doing it open to 'Internet options' dailog box. Go to connections and press lan connection. press 'advanced' button ans clear the textboxes in front of 'socks' and uncheck the msg saying 'use same address for other network protocols'
检查您的 SOCK 是否在操作系统上也被禁用。或者打开“Internet 选项”对话框。转到连接并按局域网连接。按“高级”按钮并清除“袜子”前面的文本框并取消选中“对其他网络协议使用相同地址”的味精
I did this and worked for me
我这样做并对我来说有效
回答by Micael Bergeron
If you are using Fiddler2 (or any other web sniffer/debugger tool), it may be your problem, as it acts as a local proxy.
如果您使用 Fiddler2(或任何其他网络嗅探器/调试器工具),这可能是您的问题,因为它充当本地代理。
Sometimes, even if its not running, I find myself obligated to start it and disable traffic capture.
有时,即使它没有运行,我发现自己有义务启动它并禁用流量捕获。
Hope that helps!
希望有帮助!