macbook下vscode无法升级的问题

测试环境

macbook 系统版本:
在这里插入图片描述

问题描述

下载vsocde后,测试下更新。发现vscode发出以下的报错。

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. See this link for more information.

解决办法

在终端输入以下命令

sudo chown -R $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt

输入后,回车会提示输入密码。

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

加粗部分为vscode的目录。输入完后,回车。
这样就可以解决出现的问题。


版权声明:本文为eason_will_be_good原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。