macOS -VSCode无法更新

macOS Version: 13.4.1 (c) (22F770820d)
Visual Studio Code Version: 1.80.2 (Universal)

Visual Studio Code 官方下载
在点击 Code -> Check for Updates时,提示错误:

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.

先将下载下来的 VSCode-darwin-universal.zip 解压得到 Visual Studio Code.app,再将 Visual Studio Code.app 移动至 "/Applicatios/"(全局应用程序目录) 或 "~/Applications/"(个人应用程序目录) 或 不移动(不规范,不推荐)。

如果这样还是不能更新,继续:

打开终端执行以下命令:

sudo chown -R $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt
xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app

如果遇到类似于下面的错误:

xattr: [Errno 1] Operation not permitted:

系统设置 -> 隐私与安全性 -> 完全磁盘访问权限 -> 终端

再执行一次:

xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app

最后重启Visual Studio Code

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容