Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno upgrade failed due to no write permission to "/usr/local/bin/deno" in macos 12.4 #14829

Closed
duke-git opened this issue Jun 9, 2022 · 5 comments

Comments

@duke-git
Copy link

duke-git commented Jun 9, 2022

When sudo to run deno upgrade in macos 12.4, It's still failed, cause no write permission to "/usr/local/bin/deno".
How could I set path "/usr/local/bin/deno" can be writable.

image

@shinshin86
Copy link

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.

@duke-git
Copy link
Author

@shinshin86 Thanks a lot. I solved the problem by following your guide.

@ghost
Copy link

ghost commented Nov 23, 2022

In my case, I ran ”$ chmod 711 /usr/local/bin/deno” in a terminal and it worked.

Thanks!

@btoo
Copy link
Contributor

btoo commented Feb 5, 2023

if you dont want to worry about where/how you installed deno, use

chmod 711 $(where deno)

@HilmiZul
Copy link

In my case, I ran ”$ chmod 711 /usr/local/bin/deno” in a terminal and it worked.

Thanks!

solved. thank you 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants