Howdy! I decided to try installing Trellis in WSL on my desktop Windows 11 computer so that I’d be able to leave the work computer at work for once.
However, I can’t get past this error:
user@DESKTOP-43LSUO1:~$ brew install roots/tap/trellis-cli
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Fetching roots/tap/trellis-cli
==> Downloading https://github.com/roots/trellis-cli/releases/download/v1.11.1/trellis_Linux_x86_64.tar.gz
Already downloaded: /home/user/.cache/Homebrew/downloads/d8f2bd599a8afaaf0dea020f026412cf4cea6fc16460f9644541e33daf63fbf3--trellis_Linux_x86_64.tar.gz
==> Installing trellis-cli from roots/tap
Error: The following formula cannot be installed from bottle and must be
built from source.
trellis-cli
Install Clang or run `brew install gcc`.
user@DESKTOP-43LSUO1:~$ brew install gcc
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: gcc 14.1.0 is already installed and up-to-date.
To reinstall 14.1.0, run:
brew reinstall gcc
I’ve also tried installing Clang and that doesn’t seem to help.
Same error as above, except in an image if someone prefers it that way:
Question to other Windows users: Did you ever get Vagrant working with WSL2? I feel like I’m encountering issue after issue. Getting Trellis working on macOS was a breeze. Is WSL2 just trash? I don’t understand how everything from the file rights to the SSH can give seemingly random issues.
I’m considering a dual boot to avoid the pain of this.
Apparently you need to install virtualbox_WSL2: vagrant plugin install virtualbox_WSL2
With all that installed, I manage to start a VM:
johan@DESKTOP-43LSUO1:/mnt/d/User/WP/example$ trellis up
Starting galaxy role install process
- composer (1.9.0) is already installed, skipping.
- ntp (2.3.1) is already installed, skipping.
- logrotate (v0.0.5) is already installed, skipping.
- swapfile (v2.0.36) is already installed, skipping.
- mailpit (v1.0.0) is already installed, skipping.
Running command => vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-22.04' version '202404.23.0' is up to date...
==> default: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> default: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running action triggers after up ...
==> default: Running trigger...
==> default: Adding vagrant ssh-config for www.example.test to ~/.ssh/config
==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
==> default: Your Trellis Vagrant box is ready to use!
==> default: * Composer and WP-CLI commands need to be run on the virtual machine
==> default: for any post-provision modifications.
==> default: * You can SSH into the machine with `vagrant ssh`.
==> default: * Then navigate to your WordPress sites at `/srv/www`
==> default: or to your Trellis files at `/home/vagrant/trellis`.