(See also installing Distroboxm, which is included in SteamOS 3.5 and newer: https://distrobox.it/ )
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-steam-deck )
You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable
.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.
- Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
- Click the logo at the bottom left, go to System, then go to Konsole
- Set a password (needed for sudo access):
passwd
- Install Homebrew using the steps here: https://brew.sh/
Don't install any additional libraries frompacman
orbrew
yet. Also, do not append to.bash_profile
yet, otherwise it will break Steam. - Add to
.bash_profile
with a check to make sure it is running in Konsole:echo 'if [ $(basename $(printf "%s" "$(ps -p $(ps -p $$ -o ppid=) -o cmd=)" | cut --delimiter " " --fields 1)) = konsole ] ; then '$'\n''eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'$'\n''fi'$'\n' >> ~/.bash_profile
- In Konsole's menu bar, go to Settings -> Manage Profile
- Press "New"
- Check "Default Profile"
- Set "Command" to
/bin/bash -l
(that is a lowercasel
, not a number1
) - Click OK twice
- Add brew environment to current context:
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- Install glibc (the important thing is headers).
This is needed in order to compile software.
brew install glibc
- Install GCC:
brew install gcc
What does step 11. Add Brew Environment to Current Context mean?
Do I just run that eval command in Konsole?
EDIT: Also, could someone explain to me what went wrong here?
(deck@steamdeck ~)$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for
sudo
access (which may request your password)...==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
Press RETURN/ENTER to continue or any other key to abort:
[sudo] password for deck:
==> /usr/bin/sudo /bin/chown -R deck:deck /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 73 (delta 27), reused 36 (delta 25), pack-reused 30
Unpacking objects: 100% (73/73), 99.47 KiB | 692.00 KiB/s, done.
From https://github.com/Homebrew/brew
a73e2c679..8be5846c5 master -> origin/master
HEAD is now at 8be5846c5 Merge pull request #14351 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.43.0
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'