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

"Lando cannot write to /usr/local/bin" when running lando update #3671

Closed
ccharlton opened this issue Feb 21, 2024 · 4 comments
Closed

"Lando cannot write to /usr/local/bin" when running lando update #3671

ccharlton opened this issue Feb 21, 2024 · 4 comments
Labels
bug Something aint working right!

Comments

@ccharlton
Copy link
Contributor

After running lando setup (those bits are good), running lando update presented the following error. (Just installed Lando v3.21.0-beta.1)

But here's a funny note, when I run lando version it returns "v3.21.0-beta.3"?

PACKAGE              STATUS             COMMENT
@lando/cli           ⚠ Update available https://github.com/lando/cli/releases/tag/v3.21.0-beta.2


  lando [STARTED] Updating @lando/cli to v3.21.0-beta.2  +7544ms
  lando [FAILED] Lando cannot write to /usr/local/bin!  +1ms
  lando {}  +0ms
  lando ERROR Error: An update error occured! Rerun with lando update --debug for more info.
    at Object.run (/Users/myuser/.lando/plugins/@lando/core/tasks/update.js:163:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
From previous event:
    at process.processImmediate (node:internal/timers:476:21)
From previous event:
    at Object.handler (/snapshot/cli/lib/cli.js)
    at Object.runCommand (/snapshot/cli/node_modules/yargs/lib/command.js:238:44)
    at Object.parseArgs [as _parseArgs] (/snapshot/cli/node_modules/yargs/yargs.js:1063:30)
    at Function.get [as argv] (/snapshot/cli/node_modules/yargs/yargs.js:1004:21)
    at Cli.init (/snapshot/cli/lib/cli.js)
    at Cli.run (/snapshot/cli/lib/cli.js)
    at /snapshot/cli/bin/lando.js
From previous event:
    at Object.<anonymous> (/snapshot/cli/bin/lando.js)
    at Module._compile (pkg/prelude/bootstrap.js:1930:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
    at node:internal/main/run_main_module:23:47  +4ms
@ccharlton ccharlton added the bug Something aint working right! label Feb 21, 2024
@maskedjellybean
Copy link

I'm experiencing this too.

@jeyram
Copy link

jeyram commented Feb 21, 2024

Currently you could change the permissions of that file and run lando update again successfully.
In my case, the error was in /usr/share/lando/bin.

sudo chmod 777 /usr/share/lando/bin

Screenshot from 2024-02-21 12-56-28

@reynoldsalec
Copy link
Sponsor Member

On Mac I needed to run the following:

sudo chmod a+w /usr/local/bin && sudo chmod a+w /usr/local/bin/lando && lando update

I'll let @pirog follow-up here, I know he's working on a short-term solution for this, and we'll need to put more work into a longer-term solution that's durable.

@reynoldsalec
Copy link
Sponsor Member

This is a duplicate of lando/core#109; going to close this out in favor of that issue, since ultimately this will be a lando/core fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right!
Projects
None yet
Development

No branches or pull requests

4 participants