您的位置:首页 > 编程语言 > Java开发

解决Mac OSX 10.10 Yosemite系统无法安装MyEclipse提示虚拟内存不足的问题

2015-03-24 19:00 525 查看
Mac OSX 10.10Yosemite系统安装MyEclipse2014时出错,提示虚拟内存为0MB,无法继续安装。这个是因为OSX10.10系统对VM.SWAP给加密禁用了造成~我在重装MyEclipse的时候也遇见了这个问题,尝试了很多方法,也看了很多网上的讨论,最后终于解决了~解决思路有这么几种:

1. 给系统分配虚拟内存。这个方式比较高端大气上档次,鉴于我个人比较懒,所以没有去这么做,尤其对于完美主义者来说回收虚拟内存也是一件麻烦事,方法如下:

既然没有虚拟内存(0Mb的虚拟内存)那么说明虚拟内存功能没打开,打开虚拟内存:

如果你的内存在4G以上,才可以这样做。主要因为Mac是用内存当虚拟内存的,影响系统运行性能。

禁用虚拟内存

sudo launchctl unload -w/System/Library/LaunchDaemons/com.apple.metadata.mds.plist

删除交换文件

sudo rm /private/var/vm/swapfile*

启用虚拟内存

sudo launchctl load -w/System/Library/LaunchDaemons/com.apple.metadata.mds.plist

2. 破解安装包。打开包内容,复制出来到另外的文件夹下,删除_CodeSignature文件夹,文本编辑器打开MacOS/standard-install文件,在配置里面写上-Dcom.genuitec.pulse.debug.memory.check=true,然后运行standard-install,这是老外原文:

Ifound a workaround for Mac (this works on 10.10. Yosemite):

-Download the full installer

- Openthe DMG and then show the package content of the installer

- Copythe content of the Show Package contents to a separate folder

-Delete the CodeSignature folder

- FromSystemPrefences temporarly enable "Allow apps downloaded fromAnywhere" (in your Security & Privacy settings)

- Editthe file MacOS/standard-install and add the following to the vmargs:"-Dcom.genuitec.pulse.debug.memory.check=true"

- Runstandard-install

3. 消耗系统内存,当内存不足的时候自动会启用虚拟内存,然后趁着这个时间安装即可~你可以开点耗费内存大的应用,开多几个直到能安装就行~当然你也可以在Terminal里面输入memory_pressure-l critical这个命令来做内存压力测试,他会不断占用资源来消耗内存~你所需要的只是在安装完以后Ctrl+C中断即可~不然的话,你懂的~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐