英文:
When trying to install VS Code command to PATH, I get "EACCES: permission denied, unlink '/usr/loca/bin/code'"
问题
I'm trying to add the command "code" to my VS Code path, however when I try to add it in VS Code, I get this message saying EACCES: permission denied. Do you know how I can add this to the path? Also, I'm using a Mac.
英文:
Im trying to add the command "code" to my VS code path, however when I try to add it in vs code, I get this message saying EACCES: permission denied. Do you know how I can add this to the path? Also, i'm using a mac.
答案1
得分: 0
尝试通过在VS Code命令面板中运行“Shell命令:从PATH卸载'code'命令”来卸载code
命令,然后再尝试将code
添加到PATH中。 (来源)。
如果这不起作用,请使用ls -la /usr/local/bin/code
检查/usr/local/bin/code
的权限。如果根用户拥有该文件,请使用sudo rm /usr/local/bin/code
来删除它,然后再尝试将VS Code添加到PATH中。 (来源)。
英文:
Try to uninstall the code
command by running Shell Command: Uninstall 'code' command from PATH
in the VS Code command palette, and then try installing code
to the PATH again. (source).
If that doesn't work, check the permissions of /usr/local/bin/code
with ls -la /usr/local/bin/code
. If the root user owns the file, remove it with sudo rm /usr/local/bin/code
and then try to add VS Code to the PATH again. (source).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论