When I try to create app.yml using discourse-setup i got this:
user@dominik:/var/discourse# ./discourse-setup
Ports 80 and 443 are free for use
'samples/standalone.yml' -> 'containers/app.yml'
Found 8GB of memory and 4 physical CPU cores
setting db_shared_buffers = 2048MB
setting UNICORN_WORKERS = 8
containers/app.yml memory parameters updated.
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
awk: not an option: --field-separator=:
SMTP password? []:
I cant input hostname etc. What cause this problem?
I’m using Ubuntu 16.04.
`
Hello! I recently faced a similar issue with discourse as well! On line 279 of the ./discourse-setup script, you will find a line that looks like this:
The awk (gawk) on my 16.04 supports the “hew style” (available when I first used GNU tools in the 1990s) --long-switches.
Can you tell what package provided your awk? Did you install some “minimal” Ubuntu distribution?
What does
dpkg -l |grep awk
say?
I’m working on a PR for this, but found another error that I’d like to resolve before sumitting. The awk (gawk) that is typically installed on Ubuntu supports the --field-separator switch. It looks like there is an original-awk package that installs an awk that must be the one that doesn’t support GNU-style switches. @Shivam_Trivedi or @Fajfi can you see what version of awk you have installed?
I disagree that anyone messed this up. I don’t know how someone managed to get a non GNU-compatible awk, but I do agree that it should be fixed. While I was at it, I cleaned up the check-that-default-was-changed code.
user@dominik:~# dpkg -l |grep awk ii mawk 1.3.3-17ubuntu2 amd64 a pattern scanning and text processing language
I’m using default ubuntu 16.04 installation on my VPS provider. I can also use my iso so maybe it will be better solution?
This solution works:
sed -i 's/--field-separator=/-F/g' ./discourse-setup
But when I want to start discourse on my domain i got: # Cannot load app It looks like you are offline! Please check your network connection and try again.
Thanks. That answers it for me. The standard Ubuntu comes with gawk. our VPS must have someone who prefers mawk for some reason.
I fixed it in the PR. I don’t mean to be a GNU fanboy.
If you’re getting “Cannot load app” it means that the site is down. I recommend that you do a ./launcher rebuild app (or perhaps just ./launcher start app).
All I can figure is that there is some gnu-utils package that gets installed in a /stock install/ but that there is a minimal install that doesn’t override mawk with gawk.