如何修复损坏的eclipse $ HOME / .p2仓库? [英] How can I repair a damaged eclipse $HOME/.p2 repository?

查看:1131
本文介绍了如何修复损坏的eclipse $ HOME / .p2仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在几个星期前我的Ubuntu虚拟机的磁盘空间耗尽了一大堆问题,这些问题显然已经开始了。我能够扩展虚拟磁盘,并超越了这一点,但是在幕后,这导致Eclipse以某种方式损坏了我的$ HOME / .p2存储库中的某些jar。为了弄清楚哪些罐子被破坏了,甚至是一个很长的争吵,因为Eclipse将无法安装一个新的插件,说一个zip文件是无效的,但异常信息并不是说哪个zip文件被破坏了。



在任何情况下,通过连接调试器,我能够弄清楚哪个zip文件被损坏,在我的$ HOME / .p2树中,以及我提交的错误报告原始异常中的信息缺少实际上几乎立即被修改(至少源自)。



我现在有一个损坏的$ HOME / .p2repo 。我发现五个不是零长度的jar文件,但是jar tvf和unzip -tq都报告了这五个文件的错误(repo中没有其他的jar有这个问题)。



如果重要,这是不良文件的列表:

  $ HOME / .p2 / pool / plugins /org.eclipse.emf.mapping.ecore2ecore.editor_2.7.0.v20160201-0859.jar 
$ HOME / .p2 / pool / plugins / org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar
$ HOME / .p2 / pool / plugins / org.eclipse.emf.mapping.ecore2xml_2.9.0.v20160201-0859.jar
$ HOME / .p2 / pool / plugins / org.eclipse.emf。 map.ecore2xml.ui_2.8.0.v20160201-0859.jar
$ HOME / .p2 / pool / plugins / org.eclipse.emf.mapping.ui_2.7.0.v20160201-0859.jar

不幸的是,这个$ HOME / .p2回购感觉就像当地的Maven回购,在$ HOME /。 m2 / repository,那么你可以删除不好的文件,下一个Maven的build会恢复它们,我试图删除有问题的文件(将它们移动到某个地方,以防万一),但是t只是更改Eclipse给我的错误信息,从坏的格式到找不到文件。



我要去找某些特定的罐子,或者有没有更简单的方法来让Eclipse修复这个存储库?

解决方案

Eike Stepper在这里回答: https://www.eclipse.org/forums/index.php/mv / msg / 1074901/1723920 /#msg_1723920



(请不要为Eike分配信用作为作者)


I've been working through a long string of issues that apparently started when my Ubuntu VM ran out of disk space a couple of weeks ago. I was able to expand the virtual disk and get past that, but it appears that behind the scenes this caused Eclipse to somehow corrupt some jars in my "$HOME/.p2" repository. It was even a long struggle to figure out which jars were corrupted, as Eclipse would fail to install a new plugin, saying that a zip file was invalid, but the exception info wasn't saying which zip file was corrupted.

In any case, by connecting a debugger I was able to figure out which zip file was corrupted, in my "$HOME/.p2" tree, and a bug report I filed for the lack of info in the original exception was actually fixed almost immediately (in source at least).

I'm now left with a corrupted "$HOME/.p2" repo. I found five jar files that were not zero length, but both "jar tvf" and unzip -tq" reported errors on those five files (no other jars in the repo had this problem).

If it matters, this is the list of bad files:

$HOME/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2ecore.editor_2.7.0.v20160201-0859.jar
$HOME/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar
$HOME/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2xml_2.9.0.v20160201-0859.jar
$HOME/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2xml.ui_2.8.0.v20160201-0859.jar
$HOME/.p2/pool/plugins/org.eclipse.emf.mapping.ui_2.7.0.v20160201-0859.jar

It's unfortunate that this "$HOME/.p2" repo "feels" like the local Maven repo, at "$HOME/.m2/repository". With that, you can just delete bad files and the next Maven build will restore them. I tried removing the bad files in question (moving them somewhere, just in case), but that just changes the error message Eclipse gives me from a "bad format" to "file not found".

Am I going to have to find these specific jars somewhere, or is there some easier way to get Eclipse to repair this repository?

解决方案

Question answered here by Eike Stepper: https://www.eclipse.org/forums/index.php/mv/msg/1074901/1723920/#msg_1723920

(please don't assign credits to me as Eike is the Author)

这篇关于如何修复损坏的eclipse $ HOME / .p2仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆