1. 程式人生 > >解決Mac OSX 10.10 Yosemite系統無法安裝MyEclipse提示虛擬記憶體不足的問題

解決Mac OSX 10.10 Yosemite系統無法安裝MyEclipse提示虛擬記憶體不足的問題

    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中斷即可~不然的話,你懂的~