deno upgrade failed due to no write permission to "/usr/local/bin/deno" in macos 12.4
duke-git opened this issue Β· 5 comments
I also encountered the same message.
This never happened before, but I get this error when I run deno upgrade
.
I don't know if this is caused by macOS side or deno side.
My Environment
My macOS version is 11.6.7
.
The version of deno is as follows.
$ deno --version
deno 1.21.0 (release, aarch64-apple-darwin)
v8 10.0.139.17
typescript 4.6.2
Error message
I have not run it with sudo
, but the message is the same.
$ deno upgrade
error: You do not have write permission to "/opt/homebrew/bin/deno"
How it was solved
Fortunately I have succeeded in solving this problem.
It was an error related to permission, so I granted the permission and the problem was solved.
$ chmod 711 /opt/homebrew/bin/deno
In my case, this solved the problem.
$ deno upgrade
@duke-git I don't know if this will solve your problem, but I hope it will be helpful.
@shinshin86 Thanks a lot. I solved the problem by following your guide.
In my case, I ran β$ chmod 711 /usr/local/bin/denoβ in a terminal and it worked.
Thanks!
if you dont want to worry about where/how you installed deno, use
chmod 711 $(where deno)
In my case, I ran β$ chmod 711 /usr/local/bin/denoβ in a terminal and it worked.
Thanks!
solved. thank you π₯³