Trellis installation problems on WSL

trellis new just doesn’t complete for me on WSL2.

trellis new mysite.ie
Creating new Trellis project in /mnt/h/webdev/roots/mysite.ie

Site domain [mysite.ie]:
✔ mysite.ie
Initializing project...

[✓] Created virtualenv (/mnt/h/webdev/roots/mysite.ie/trellis/.trellis/virtualenv)
[✓] Ensure pip is up to date
⠏   Installing dependencies (this can take a minute...)

pip install taking longer than expected. Switching to verbose output:

I never get any further than this.

The process completes if I use a folder within WSL (e.g. \wsl.localhost\home\roots\mysite.ie) but then that causes all kinds of other errors. Should I be using the /mnt/ folder or a folder within WSL?

Any other ideas would be appreciated. Thanks.

@MWDelaney shared these steps that worked for him the other month:

  • Vagrant installed in WSL
  • VirtualBox installed in Windows
  • Working from a DrvFS directory (still required)
  • Two environment variables:
    • VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
      • export PATH="$PATH:/mnt/c/Program Files/Oracle/VirtualBox"

This is documented at Installing Trellis | Trellis Docs | Roots

Thanks. I already those lines added to my WSL ~/.bashrc file but it doesn’t seem to solve the problem.

After you modified your .bashrc file did you re-initialize your terminal? There’s several ways to do so

I did indeed. Usually I just do:

source ~/.bashrc

I’ve restarted my computer and tried various other things.

1 Like

This part I’m still not sure on:

Working from a DrvFS directory

Can I just use a regular windows folder (e.g. /mnt/c) or does the folder need to be within the linux subsystem?

I’ve had issues with this, too.

Keep in mind, when working from within the Windows filesystem, it is incredibly slow - almost unbearably so.

Even setting it up within WSL and transferring the files after the build is complete, takes ages.

I ended up working strictly within WSL2 using Lando and Docker for Desktop. Blazing fast compared to using Vagrant/Virtualbox.

1 Like

Yes, it does seem to be a problem of speed when communicating between WSL and the mounted folders. It’s much faster running these commands on a folder within WSL, but then that gets really complicated too (drfs folders and vagrantfile customisations).

With Trellis CLI and Bud I am finding Roots-Windows development even more difficult than it used to be. Docker and Lando sound intriguing but figuring out a whole other stack does not :frowning: Don’t suppose there’s an online guide for this?

I’ll continue for now with Laragon (like wamp), and WSL for compiling Acorn assets / deploying remote sites.

I used to use Laragon, and while it’s very point and shoot-easy, actually, so is Lando.

The guide for setting up Lando is a mix between what’s on here (in the docs) and Lando’s own Getting Started.

I found that it was really easy to get up and running. Moreso than Vagrant. And also, Virtualbox itself was super slow on my system. YMMV

Cool. Well I would love to get rid of Vagrant / Virtualbox. I will try out this Lando when I get a chance. Thanks for the advice!

Would you still use Trellis for remote deployments?

Yes, Trellis for deployments with Github. I’m using Radicle though, so it’s almost plug n play in that sense.

2 Likes

Did someone say Trellis for deployments with GitHub?

3 Likes