# Failed to install Koa in AWS Ubuntu 20.04 (mysql-client error)

**URL:** <https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132>\
**Category:** Site Operations Help\
**Created:** [January 26, 2021, 7:25am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132 "2021-01-26T07:25:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![smadt\_tech](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/smadt_tech/32/2044_2.png) [@smadt\_tech](https://discuss.openedx.org/u/smadt_tech)\
**Post date:** [January 26, 2021, 7:25am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/1 "2021-01-26T07:25:49Z")

</div>

TASK [mysql : install mysql-5.7-client] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [localhost]: FAILED! =\> {“cache\_update\_time”: 1611644091, “cache\_updated”: true, “changed”: false, “msg”: “’/usr/bin/apt-get -y -o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options::=–force-confold” install ‘mysql-client=5.7.32-1ubuntu18.04’’ failed: E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found\n”, “rc”: 100, “stderr”: “E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found\n”, “stderr\_lines”: [“E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found”], “stdout”: “Reading package lists…\nBuilding dependency tree…\nReading state information…\n”, “stdout\_lines”: [“Reading package lists…”, “Building dependency tree…”, “Reading state information…”]}

According to the instructions Ubuntu 20.04 is needed.  
However, when I follow the instructions I saw errors during mysql-client. It looks like mysql 5.7 is no longer available in 20.04.

---

<div class="post-metadata">

**Author:** ![amit](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@amit](https://discuss.openedx.org/u/amit)\
**Post date:** [January 27, 2021, 1:27pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/2 "2021-01-27T13:27:33Z")

</div>

I’m facing same issue while installing **Koa native**.

```
"stderr": "E: Version '5.7.32-1ubuntu18.04' for 'mysql-client' was not found\n"

```

Is it good idea to use bionic source list for MySQL 5.7, or it might be conflict with dependencies?

---

<div class="post-metadata">

**Author:** ![eugenechabanov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/eugenechabanov/32/3018_2.png) [@eugenechabanov](https://discuss.openedx.org/u/eugenechabanov)\
**Post date:** [January 27, 2021, 3:37pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/4 "2021-01-27T15:37:24Z")

</div>

+1  
Has anyone resolved this?

---

<div class="post-metadata">

**Author:** ![whbogado](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/whbogado/32/2050_2.png) [@whbogado](https://discuss.openedx.org/u/whbogado)\
**Post date:** [January 28, 2021, 12:58pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/5 "2021-01-28T12:58:42Z")

</div>

The MySQL version 5.7.32-1ubuntu18.04 was replaced by 5.7.33-1ubuntu18.04 in the Ubuntu repository but the Ansible script for open-release/koa.1 was not updated. It was updated in open-release/koa.master though.

If you install from the open-release/koa.master branch it should work.

---

<div class="post-metadata">

**Author:** ![whbogado](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/whbogado/32/2050_2.png) [@whbogado](https://discuss.openedx.org/u/whbogado)\
**Post date:** [January 28, 2021, 1:05pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/6 "2021-01-28T13:05:58Z")

</div>

As far as I know, the bionic repository only contains MySQL 8. The installation script replaces the APT sources list and will force the installation of the 5.7 version. To install MySQL 8 you would have to edit the Ansible scripts but I suspect it would cause other problems.

The easiest solution is to install from the open-release/koa.master branch.

---

<div class="post-metadata">

**Author:** ![amit](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@amit](https://discuss.openedx.org/u/amit)\
**Post date:** [January 28, 2021, 2:22pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/7 "2021-01-28T14:22:46Z")

</div>

Thank you for the information 🙂

The change was made in master only, I [requested](https://github.com/edx/configuration/pull/6248) to cherry pick in koa.master.

---

<div class="post-metadata">

**Author:** ![Herve\_siyou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/herve_siyou/32/1452_2.png) [@Herve\_siyou](https://discuss.openedx.org/u/Herve_siyou)\
**Post date:** [January 31, 2021, 7:01pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/8 "2021-01-31T19:01:07Z")

</div>

Still the same error, i just try an installation right now, and it failed:

> TASK [mysql : Remove experimental version of mysql] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> [DEPRECATION WARNING]: Invoking “apt” only once while using a loop via  
> squash\_actions is deprecated. Instead of using a loop to supply multiple items  
> and specifying `name: "{{ item }}"`, please use `name: ['mysql-server-5.6', 'mysql-server']` and remove the loop. This feature will be removed in version  
> 2.11. Deprecation warnings can be disabled by setting  
> deprecation\_warnings=False in ansible.cfg.  
> skipping: [localhost] =\> (item=)
> 
> TASK [mysql : Install mysql dependencies] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> ok: [localhost]
> 
> TASK [mysql : Install mysql] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> skipping: [localhost]
> 
> TASK [mysql : Set default character sets and collations] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> skipping: [localhost]
> 
> TASK [mysql : add the mysql signing key] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> changed: [localhost]
> 
> TASK [mysql : add the mysql-5.7 repo to the sources list] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> changed: [localhost]
> 
> TASK [mysql : install mysql-5.7-client] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> fatal: [localhost]: FAILED! =\> {“cache\_update\_time”: 1612114379, “cache\_updated”: false, “changed”: false, “msg”: “‘/usr/bin/apt-get -y -o "Dpkg::Options::=–force-confdef" -o "Dpkg::Options::=–force-confold" install ‘mysql-client=5.7.32-1ubuntu18.04’’ failed: E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found\n”, “rc”: 100, “stderr”: “E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found\n”, “stderr\_lines”: [“E: Version ‘5.7.32-1ubuntu18.04’ for ‘mysql-client’ was not found”], “stdout”: “Reading package lists…\nBuilding dependency tree…\nReading state information…\n”, “stdout\_lines”: [“Reading package lists…”, “Building dependency tree…”, “Reading state information…”]}
> 
> PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> localhost : ok=57 changed=24 unreachable=0 failed=1 skipped=189 rescued=0 ignored=1
> 
> ## ============================================================ Ansible failed!
> 
> Decoded error:  
> No message to decode.
> 
> ## ============================================================ Installation failed!
> 
> # If you need help, see [Connect - Open edX](https://open.edx.org/getting-help) . When asking for help, please provide as much information as you can. These might be helpful: Your log file is at /root/logs/install-20210131-182439.log Your environment: OPENEDX\_RELEASE=open-release/koa.master

---

<div class="post-metadata">

**Author:** ![eriam](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/eriam/32/2016_2.png) [@eriam](https://discuss.openedx.org/u/eriam)\
**Post date:** [February 1, 2021, 7:24am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/9 "2021-02-01T07:24:28Z")

</div>

Hello @Herve_siyou

You need to change the config files in /var/tmp/configuration, did you do that ?

Regards

Eriam

---

<div class="post-metadata">

**Author:** ![Herve\_siyou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/herve_siyou/32/1452_2.png) [@Herve\_siyou](https://discuss.openedx.org/u/Herve_siyou)\
**Post date:** [February 1, 2021, 8:05am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/10 "2021-02-01T08:05:00Z")

</div>

Hello @eriam

No i didn’t.

Please can you tell me exactly what to change?

---

<div class="post-metadata">

**Author:** ![eriam](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/eriam/32/2016_2.png) [@eriam](https://discuss.openedx.org/u/eriam)\
**Post date:** [February 1, 2021, 8:13am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/11 "2021-02-01T08:13:00Z")

</div>

@Herve_siyou look at the commits on github: [https://github.com/edx/configuration/pull/6248/commits](https://github.com/edx/configuration/pull/6248/commits)

They show what you need to change to get the installation working.

---

<div class="post-metadata">

**Author:** ![Herve\_siyou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/herve_siyou/32/1452_2.png) [@Herve\_siyou](https://discuss.openedx.org/u/Herve_siyou)\
**Post date:** [February 1, 2021, 8:56am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/12 "2021-02-01T08:56:35Z")

</div>

@eriam IT WORKS!!!

Edit the file:

> nano /var/tmp/configuration/playbooks/roles/mysql/defaults/main.yml

changed:

> mysql\_server\_5\_7\_pkg: “mysql-server=5.7.32-1ubuntu18.04”  
> mysql\_client\_5\_7\_pkg: “mysql-client=5.7.32-1ubuntu18.04”  
> mysql\_community\_server\_5\_7\_pkg: “mysql-server=5.7.32-1ubuntu18.04”

to:

> mysql\_server\_5\_7\_pkg: “mysql-server=5.7.33-1ubuntu18.04”  
> mysql\_client\_5\_7\_pkg: “mysql-client=5.7.33-1ubuntu18.04”  
> mysql\_community\_server\_5\_7\_pkg: “mysql-server=5.7.33-1ubuntu18.04”

And edit the file:

> nano /var/tmp/configuration/playbooks/edx\_continuous\_integration.yml

changed:

> mongo\_3\_6

to:

> mongo\_4\_0

Thank you!

---

<div class="post-metadata">

**Author:** ![arbrandes](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arbrandes/32/158_2.png) [@arbrandes](https://discuss.openedx.org/u/arbrandes)\
**Post date:** [February 2, 2021, 7:33pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/13 "2021-02-02T19:33:07Z")

</div>

Hi thread followers,

We’ll be looking into this as part of the [build-test-release working group](https://openedx.atlassian.net/wiki/spaces/COMM/pages/1022099494/Build+-+Test+-+Release+Working+Group)’s work on releasing Koa.2 next Tuesday. (Thanks for the PR, @amit!)

C/C @nedbat

---

<div class="post-metadata">

**Author:** ![james.weeks.bey](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@james.weeks.bey](https://discuss.openedx.org/u/james.weeks.bey)\
**Post date:** [February 6, 2021, 10:27pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/14 "2021-02-06T22:27:04Z")

</div>

Thanks for following through on this issue, i just encountered it as well last night.

Kind regards  
James

---

<div class="post-metadata">

**Author:** ![arbrandes](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arbrandes/32/158_2.png) [@arbrandes](https://discuss.openedx.org/u/arbrandes)\
**Post date:** [February 10, 2021, 11:02pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/15 "2021-02-10T23:02:30Z")

</div>

Turns out we missed the fix for `koa.2` yesterday, but we made up for it today with [koa.2a](https://discuss.openedx.org/t/koa-2a-has-been-tagged/4250).

Thank you all for reporting the bug, and the fix!

---

<div class="post-metadata">

**Author:** ![Programmingisfun93](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/programmingisfun93/32/2325_2.png) [@Programmingisfun93](https://discuss.openedx.org/u/Programmingisfun93)\
**Post date:** [March 30, 2021, 5:13am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/16 "2021-03-30T05:13:47Z")

</div>

Hi, I am new to openedx technology and have Ansible failed! message.  
Followed what Herve\_siyou has suggested but to no avail.

---

<div class="post-metadata">

**Author:** ![vzahradnik](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/vzahradnik/32/2521_2.png) [@vzahradnik](https://discuss.openedx.org/u/vzahradnik)\
**Post date:** [April 22, 2021, 11:44am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/17 "2021-04-22T11:44:12Z")

</div>

I just ran into the same issue with latest Ubuntu Server 20.04.2. Apparently, the mysql-client version has been bumped to 5.7.34 now.

I fixed this issue by changing the file, as discussed above:  
`/var/tmp/configuration/playbooks/edx_continuous_integration.yml`

---

<div class="post-metadata">

**Author:** ![eugenechabanov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/eugenechabanov/32/3018_2.png) [@eugenechabanov](https://discuss.openedx.org/u/eugenechabanov)\
**Post date:** [May 24, 2021, 4:58pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/18 "2021-05-24T16:58:09Z")

</div>

The solution above was working until recently the mysql 5.7.33 started giving error again. So based on technique above, we need to change 2 files.  
Mongo 3\_6 → 4\_0 and mysql, but instead of mysql version 33 change the number to 34.  
File:

> nano /var/tmp/configuration/playbooks/roles/mysql/defaults/main.yml

```
mysql_server_5_7_pkg: "mysql-server=5.7.34-1ubuntu18.04"
mysql_client_5_7_pkg: "mysql-client=5.7.34-1ubuntu18.04"
mysql_community_server_5_7_pkg: "mysql-server=5.7.34-1ubuntu18.04"

```

and mongo as stated previously:

> nano /var/tmp/configuration/playbooks/edx\_continuous\_integration.yml  
> mongo\_3\_6 → mongo\_4\_0

---

<div class="post-metadata">

**Author:** ![zanstro](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zanstro/32/2592_2.png) [@zanstro](https://discuss.openedx.org/u/zanstro)\
**Post date:** [July 21, 2021, 9:03am UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/19 "2021-07-21T09:03:56Z")

</div>

Hello,

I tried to install Koa in Ubuntu 20.04 from open-release/koa.master but I got this error:

```auto
E: Version '5.7.34-1ubuntu18.04' for 'mysql-client' was not found

```

any solution for this?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![ARMBouhali](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/armbouhali/32/324_2.png) [@ARMBouhali](https://discuss.openedx.org/u/ARMBouhali)\
**Post date:** [July 25, 2021, 2:00pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/20 "2021-07-25T14:00:53Z")

</div>

I solved this the same way as done in the previous answers.  
Just use the next possible version (replace 34 with 35) in the file:

> nano /var/tmp/configuration/playbooks/roles/mysql/defaults/main.yml

Once replaced you should have those lines instead:

```auto
mysql_server_5_7_pkg: "mysql-server=5.7.35-1ubuntu18.04"
mysql_client_5_7_pkg: "mysql-client=5.7.35-1ubuntu18.04"
mysql_community_server_5_7_pkg: "mysql-server=5.7.35-1ubuntu18.04"

```

I don’t think it’s a good practice to commit a new mysql version number each time.  
Shouldn’t we add instead an ansible task to retrieve the first available mysql version that satisfies a given constraint ? **(e.g. Look for whatever mysql 5.7.x-1ubuntu18.04**)

---

<div class="post-metadata">

**Author:** ![reactific](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/reactific/32/2701_2.png) [@reactific](https://discuss.openedx.org/u/reactific)\
**Post date:** [July 25, 2021, 3:05pm UTC](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132/21 "2021-07-25T15:05:01Z")

</div>

> [@eriam](#):
>
> [sandboxes now run mongo4 and no longer run mongo 3.6 by syedimranhassan · Pull Request #6248 · openedx/configuration · GitHub](https://github.com/edx/configuration/pull/6248/commits)

I just tried this and it is insufficient on a vanilla GCE Ubuntu 20.04 VM. There is no available repo to provide MySQL 5.7.anything since it uses 8.x only.

I would go a step further and look for whatever MySQL version is available on the Ubuntu release and not restrict it to 5.7. I realize that may mean updating some code but hopefully, 5.7 and 8 are not incompatible? If so, maybe the maple release should just bite the bullet and upgrade to 8.whatever?

[Next page](https://discuss.openedx.org/t/failed-to-install-koa-in-aws-ubuntu-20-04-mysql-client-error/4132.md?page=2)
