Getting Started: permissions issue with ubuntu linuxbrew #6546
Unanswered
crkrenn
asked this question in
Getting started
Replies: 1 comment
-
|
Not sure what the goal here is. Likely step 1 already fixed your issue but we'll never know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew configOutput of
brew doctorDescription of issue
The recommended installation method
does not work with Ubuntu 24.04.3 LTS when connected with ssm auth on aws.
With ChatGPT's help (see below), I could get brew installed, but I wanted to share this experience so it could help others.
Manual Homebrew Installation Workaround (Linuxbrew Prefix Issue)
At this point the official installer script is failing due to persistent permission issues in the Linuxbrew prefix. The good news: you're very close, and you can finish the installation manually while still staying fully compliant with the documented recommended prefix:
The recurring error:
indicates that the installer is attempting to initialize the
Homebrew/directory as a git repository, but the permissions inside that directory are still incorrect.Instead of continuing to fight the install script, here is a manual installation process that Homebrew officially supports. This avoids the problematic step and uses the correct prefix.
1. Clean up the broken Homebrew checkout
Run as
ssm-user:This removes only the partial or corrupted checkout; we leave the main prefix directory intact.
2. Ensure the prefix is writable
Since
ssm-useris already in thelinuxbrewgroup, ensure proper ownership and group permissions:3. Manually clone Homebrew into the prefix
Create the
brewwrapper in thebindirectory:At this point you now have exactly what the installer script attempts to create.
4. Add Homebrew to your PATH
Append to your
~/.bashrc:And load it immediately:
5. Verify installation
If these commands run successfully, Homebrew is now correctly installed under the recommended Linux prefix (
/home/linuxbrew/.linuxbrew), and you have bypassed the installer’s failing git-initialization step.If any of the manual steps fail—especially the
git clone—feel free to share the output so permissions can be adjusted precisely.Beta Was this translation helpful? Give feedback.
All reactions