# Problem with fresh installation

**URL:** <https://meta.discourse.org/t/problem-with-fresh-installation/85187>\
**Category:** Self-hosting\
**Created:** [April 12, 2018, 8:12pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187 "2018-04-12T20:12:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fajfi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fajfi/32/381507_2.png) [@Fajfi](https://meta.discourse.org/u/Fajfi)\
**Post date:** [April 12, 2018, 8:12pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/1 "2018-04-12T20:12:37Z")

</div>

Hi!

I need to create new discourse like I’ve tried lately, I used this commands:

[https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

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.  
`

---

<div class="post-metadata">

**Author:** ![Shivam\_Trivedi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shivam_trivedi/32/120114_2.png) [@Shivam\_Trivedi](https://meta.discourse.org/u/Shivam_Trivedi)\
**Post date:** [April 13, 2018, 6:33am UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/2 "2018-04-13T06:33:47Z")

</div>

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:

```
 read_config_result=`echo $config_line | awk --field-separator":" '{print $2}'`

```

If you change the line to this:

```
 read_config_result=`echo $config_line | awk -F":" '{print $2}'`

```

things should work.

I guess awk does not have the --field-separator parameter anymore.

If you do not wish to manually replace that line, you can just use this command below:

```
sed -i 's/--field-separator=/-F/g' ./discourse-setup

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [April 13, 2018, 6:39am UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/3 "2018-04-13T06:39:52Z")

</div>

It looks like we messed this up @pfaffman – can you take a look and fix ASAP? Thanks for the diagnosis @Shivam_Trivedi!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [April 13, 2018, 12:19pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/4 "2018-04-13T12:19:51Z")

</div>

That’s very strange!

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?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [April 13, 2018, 1:09pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/5 "2018-04-13T13:09:29Z")

</div>

> [@codinghorror](#):
>
> It looks like we messed this up @pfaffman

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.

@codinghorror, please see

[https://github.com/discourse/discourse\_docker/pull/392](https://github.com/discourse/discourse_docker/pull/392)

I would still like to know under what circumstances you install a non GNU-compatible `awk(1)`, especially on Ubuntu 16.04.

---

<div class="post-metadata">

**Author:** ![Fajfi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fajfi/32/381507_2.png) [@Fajfi](https://meta.discourse.org/u/Fajfi)\
**Post date:** [April 13, 2018, 1:51pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/6 "2018-04-13T13:51:19Z")

</div>

@pfaffman

`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.`

Where can I find logs?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [April 13, 2018, 2:01pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/7 "2018-04-13T14:01:57Z")

</div>

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`).

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [April 13, 2018, 8:56pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/8 "2018-04-13T20:56:34Z")

</div>

Looks like we did mess this up after all 😉 thanks for the fix!

I’d definitely be sure to test on _stock Ubuntu_ first.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [April 14, 2018, 1:11pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/9 "2018-04-14T13:11:22Z")

</div>

Digital Ocean installs `gawk`. Every Ubuntu install that I can find has `gawk` installed. [https://askubuntu.com/questions/710379/do-i-need-to-install-awk-or-is-it-inbuilt-in-ubuntu](https://askubuntu.com/questions/710379/do-i-need-to-install-awk-or-is-it-inbuilt-in-ubuntu) claims that `mawk` is the default, but [Ubuntu – Error](https://packages.ubuntu.com/trusty/lsb-core) says taht lsb-core includes

> [@](#):
>
> [mawk](https://packages.ubuntu.com/trusty/mawk)
> 
> a pattern scanning and text processing language
> 
> or [gawk](https://packages.ubuntu.com/trusty/gawk)
> 
> GNU awk, a pattern scanning and processing language

**OR**? But no explanation of what “or” means.

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`.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [June 8, 2024, 12:37pm UTC](https://meta.discourse.org/t/problem-with-fresh-installation/85187/10 "2024-06-08T12:37:38Z")

</div>

This topic was automatically closed after 2248 days. New replies are no longer allowed.
