如图所示:
搞了两天终于解决来。发现网上对此问题的解决办法也是说的不清不楚对,总的来说有三种方法,当然我只用了其中都一种。
方法一:
Mac OS中用虚拟内存来提高性能,可是我用的macbook 有8g内存 要用上虚拟内存还是比较少的,所以你可以开几个大程序把你的内存耗光,然后再重新安装就可以来。
方法二:
贴吧看到的,
解决办法为
I found a workaround for Mac (this works on 10.10. Yosemite):
- Download the full installer
- Open the DMG and then show the package content of the installer
- Copy the content of the Show Package contents to a separate folder
- Delete the CodeSignature folder
- From SystemPrefences temporarly enable "Allow apps downloaded from Anywhere" (in your Security & Privacy settings)
- Edit the file MacOS/standard-install and add the following to the vmargs: "-Dcom.genuitec.pulse.debug.memory.check=true"
- Run standard-install
意思就是说:
下载这个安装包
打开DMG并展开安装包的内容
复制包里的内容
删除CodeSignature文件夹
从SystemPrefences temporarly启用“允许应用程序从任何地方下载”(在你的安全与隐私设置)
编辑文件MacOS /标准安装,并添加以下vmargs:“-Dcom.genuitec.pulse.debug.memory.check = true”
据说可用。
方法三(亲测可用):
既然没有虚拟内存(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
总结:曾经总认为电脑问题、环境配置问题时一种浪费时间,可是其实,对于一个优秀的程序员来说就是要能轻松解决这种问题!所以不要抱怨,而是激流勇进!