下載 itunes12.6.5
關(guān)閉SIP系統(tǒng)完整性保護(hù)
重啟電腦,長按command + r
進(jìn)入修復(fù)模式
點(diǎn)擊實(shí)用工具慷垮,選擇終端
在終端輸入命令
$ csrutil disable
提示關(guān)閉之后啥么,重啟電腦
.
卸載itunes
1.在終端輸入命令 sudo -i 進(jìn)入系統(tǒng)的root目錄
sudo -i
2.繼續(xù)輸入命令,卸載iTunes
rm -rf /Applications/iTunes.app
3.手動(dòng)刪除itunes目錄
- ~/Library 路徑下刪除itunes目錄
- ~/Music 路徑下刪除itunes目錄
4.使用腳本編輯器
- 使用腳本刪除itunes
set question to display dialog "Delete iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "rm -rf /Applications/iTunes.app" with administrator privileges
display dialog "iTunes was deleted" buttons {"Ok"}
set theDMG to choose file with prompt "Please select iTunes 12.6 dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
do shell script "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "rm -rf ~/tmp"
end if
if answer is equal to "No" then
display dialog "iTunes was not deleted" buttons {"Ok"}
return
end if
set question to display dialog "Install iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "open ~/Desktop/iTunes.pkg"
return
end if
if answer is equal to "No" then
display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
return
end if
2.通常在10.14.4+版本 腳本會(huì)報(bào)錯(cuò)。這時(shí)可以使用一下腳本安裝
display dialog "Please select iTunes 12.6 dmg file" buttons {"Ok"}
set theDMG to choose file with prompt "Please select iTunes 12.6 dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
do shell script "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "rm -rf ~/tmp"
set question to display dialog "Install iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "open ~/Desktop/iTunes.pkg"
return
end if
if answer is equal to "No" then
display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
return
end if
執(zhí)行之后碎罚,選擇已經(jīng)下載好的itunes12.6安裝包。
安裝成功之后纳像,先別著急打開應(yīng)用荆烈,打開應(yīng)用程序itunes目錄。右鍵顯示包內(nèi)容竟趾,進(jìn)入Contents
目錄耙考,拷貝info.plist到桌面. 以我這邊為例,搜索 12.6.5
更改為更高的版本潭兽,我這里改為12.9.5
倦始。然后替換Contents目錄下的info.plist文件。
5.打開itunes 即可
6.在設(shè)置完畢之后別忘記重新打開SIP系統(tǒng)完整性保護(hù)
步驟與關(guān)閉SIP步驟一直山卦,在修復(fù)模式下執(zhí)行命令鞋邑,然后重啟
$ csrutil enable