When trying to install VS Code command to PATH, I get "EACCES: permission denied, unlink '/usr/loca/bin/code'"

huangapple go评论61阅读模式
英文:

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. When trying to install VS Code command to PATH, I get "EACCES: permission denied, unlink '/usr/loca/bin/code'"

When trying to install VS Code command to PATH, I get "EACCES: permission denied, unlink '/usr/loca/bin/code'"

答案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).

huangapple
  • 本文由 发表于 2023年7月3日 04:28:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76600664.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定