macOS Version: 13.4.1 (c) (22F770820d)
Visual Studio Code Version: 1.80.2 (Universal)
Visual Studio Code 官方下載
在點(diǎn)擊 Code -> Check for Updates時(shí),提示錯(cuò)誤:
Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. This might mean the application was put on quarantine by macOS.
先將下載下來(lái)的 VSCode-darwin-universal.zip 解壓得到 Visual Studio Code.app,再將 Visual Studio Code.app 移動(dòng)至 "/Applicatios/"(全局應(yīng)用程序目錄) 或 "~/Applications/"(個(gè)人應(yīng)用程序目錄) 或 不移動(dòng)(不規(guī)范,不推薦)。
如果這樣還是不能更新肚菠,繼續(xù):
打開(kāi)終端執(zhí)行以下命令:
sudo chown -R $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt
xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app
如果遇到類(lèi)似于下面的錯(cuò)誤:
xattr: [Errno 1] Operation not permitted:
系統(tǒng)設(shè)置 -> 隱私與安全性 -> 完全磁盤(pán)訪問(wèn)權(quán)限 -> 終端
再執(zhí)行一次:
xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app
最后重啟Visual Studio Code