fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

FastPath installer doesn't work on Linux

Open vcampitelli opened this issue 1 year ago • 4 comments

What happened?

I've ran the install steps in the Fast Path Install guide and it's giving a sh: 64: [[: not found.

Suggestion: change the install command to:

curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-install/master/install.sh | bash

Version

n/a

Affects Versions

No response

vcampitelli avatar Jan 08 '24 13:01 vcampitelli

@vcampitelli can you provide additional detail?

  • What version of Linux are you using?
  • What shell are you using?

What happens if you run the command as documented here https://fusionauth.io/docs/get-started/download-and-install/fast-path instead of modifying it?

sh -c "curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-install/master/install.sh | sh -s - -z"

It looks like you are running a different version of the command - if that is the case it is not supported. Please re-open if running the command as documented does not work.

robotdan avatar Feb 07 '24 18:02 robotdan

Hi @robotdan,

I'm running the exact command from the docs (sh -c "curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-install/master/install.sh | sh").

My suggestion is to change sh to bash, as the [[ ]] syntax for ifs aren't supported by dash, which is the default shell implementation on the majority of Linux distributions out there.

vcampitelli avatar Feb 08 '24 19:02 vcampitelli

@vcampitelli can you please add the other information @robotdan requested?

mooreds avatar Feb 08 '24 20:02 mooreds

  • What version of Linux are you using? Ubuntu 23.10
  • What shell are you using? Default shell from distro (dash)

There are a lot of distros that use dash by default, like Debian and Ubuntu:

$ docker run --rm -it debian:12 sh -c 'apt-get -qq update && apt-get -qqy install curl unzip > /dev/null && sh -c "curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-install/master/install.sh | sh"'
$ docker run --rm -it ubuntu:23.10 sh -c 'apt-get -qq update && apt-get -qqy install curl unzip > /dev/null && sh -c "curl -fsSL https://raw.githubusercontent.com/FusionAuth/fusionauth-install/master/install.sh | sh"'

image

These errors are related to using [[ and ]], which aren't supported by Dash.

It does work on alpine and arch, because they use bash and busybox as the default shell interpreter, respectively:

image

Changing the command to use bash instead of sh will work in almost all Linux distros (the only one I know that doesn't have bash by default is alpine, which is normally used within containers and not in the userland).

vcampitelli avatar Feb 09 '24 19:02 vcampitelli