下載iTunes 12.6版本:https://support.apple.com/zh-cn/HT208079
安裝低版本iTunes
利用腳本編輯器運行腳本安裝低版本iTunes:
關閉SIP系統完整性保護
- 打開Mac終端輸入命令:
csrutil status
$ csrutil status
- 默認情況下是開啓的
System Integrity Protection status: enabled.
-
重啓電腦,按住鍵盤上面的cmmand+r,進入修復模式
點擊實用工具,選擇終端
輸入命令:csrutil disable
$ csrutil disable
再次重啓電腦
建議這裏記得安裝完成後改回來,開啓SIP和前面的操作一致,在修復模式下,輸入命令
csrutil enable
$ csrutil enable
打開腳本編輯器,將以下代碼複製到腳本編輯器運行(卸載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
運行後根據提示卸載安裝。
如果提示 iTunes Library.itl 錯誤,打開終端運行命令:sudo rm ~/Music/iTunes/iTunes\ Library.itl
$ sudo rm ~/Music/iTunes/iTunes\ Library.itl
或者:
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
運行腳本卸載iTunes後,按照腳本提示選擇12.6版本iTunes的安裝包進行安裝即可。