Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Can't download spigot getting "Windows Subsystem for Linux " error message

  • 282 Views
  • Last Post 21 January 2022
  • Topic Is Solved
roaminglt posted this 19 January 2022

Installed AMP on Windows today and am working on getting a Minecraft spigot instance.

When going into the instance and clicking 'update' on the console I get the message: Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore

I'm not trying to use WSL, so I don't know why I'm getting this error. I have windows git installed, and when opening a regular command prompt to check git I run "git --version" and it reports as "git version 2.34.1.windows.1"

I have 'C:\Program Files\Git\cmd\' as the first item in my path for both my current user and the system path.

I do actually have WSL installed on this machine with a distribution. I don't want to have to uninstall it, I want AMP to not try and use it.

I must be missing something but don't know what and would appreciate some help.

many thanks

Order By: Standard | Newest | Votes
Mike posted this 19 January 2022

Is AMP running as a service? If so was Git installed in such a way that it's in PATH for all users?

roaminglt posted this 20 January 2022

Hi Mike,

Thank you for your question.

Yes, AMP is running as a service and git is in the system path of environment variables as well as in the path for my user.

Not sure how to test it, but I've run 'cmd' as administrator and "git --version" still reports as "git version 2.34.1.windows.1"

Mike posted this 20 January 2022

Can you put the affected AMP instance into Debug mode (change Monitoring.LogLevel to -1 in that instances AMPConfig.conf) - and then when you hit update, show me the log output it produces in its log file (Logs directory in its instance directory)

roaminglt posted this 20 January 2022

I've uninstalled git and re-installed an older version, in case I needed an older version.

I'd previously had a 64bit version of git so the re-install was a 32bit version (2.27). Before rebooting I tried to update my instance, it tells me "Git is not installed or is not available in PATH." (which is a good sign, as it isn't in my path!).

I reboot. But same error as before about WSL.

I've chedked every other directory in my path, and only one contains a git.exe and that's the windows one I installed.

Can anyone advise exactly what AMP is doing, what is it calling in the background, and is there any way to step through what it is doing (outside of AMP) to see where this is going wrong and how it is managing to produce an error referencing WSL?

roaminglt posted this 20 January 2022

Thanks Mike,

Sorry I posted before seeing your other reply. I've done as you suggested and output is at: https://pastebin.com/nNd0gqQP

The bit jumping out at me is:

[13:00:09] [System:admin Debug] : Moving C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\tmpFB90.tmp to ./Minecraft/spigotbuild\BuildTools.jar...

[13:00:09] [Minecraft:admin Info] : Selected release stream is SpecificVersion...

[13:00:09] [Minecraft:admin Debug] : Running command line: "C:\WINDOWS\system32\bash.exe -c "java -Xmx1024M -jar BuildTools.jar --rev 1.18.1"" from "./Minecraft/spigotbuild"

Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore

When AMP is "Running command line" where does it get this from? Should it be running bash? If not, how does it decide what to run?

Mike posted this 20 January 2022

It's expecting bash to be provided by the git installation. One of the options for installing Git for Windows puts the common git tools (including bash) in PATH which is where it's looking.

roaminglt posted this 20 January 2022

Thanks Mike,

The options when installing git don't look exactly the same as in the screenshot on the git dependencies page for AMP, but they are very similar so I had picked the middle option:

image at: https://pasteboard.co/G2GjN3pDjcxb.png

After the middle option my path includes "C:\Program Files (x86)\Git\cmd" and there's no 'bash' in there.

I've done a re-install using the bottom option which adds more things to the path than the middle option.

My path now includes "C:\Program Files (x86)\Git\mingw32\bin" in which there's no 'bash' and "C:\Program Files (x86)\Git\usr\bin" which does include a bash executable!

I did also disable WSL - decided to just bite the bullet on that one and limit the number of factors affecting this!

After a reboot I'm seeing a much different and mor epositive message, see https://pastebin.com/8fW4hSAU

This suggests this is working now! May I suggest https://github.com/CubeCoders/AMP/wiki/AMP-Dependencies---Git be updated with a new screenshot reflecting the differently worded options on the more recent git for windows installer?

Finally, thank you so very much for your help Mike, I do really appreciate it.

Mike posted this 21 January 2022

No problem. We'll revise the wiki article and look to see if there's a way of coping in situations where git and WSL are both installed on the system causing this conflict (I suspect the installation order may have an affect too...)

Close