Issues while Spinning up a DHIS2 local instance on Ubuntu 22.04

Hello everyone.
While following the steps described in this link
How to spin up a DHIS2 local instance | DHIS2 Developer Portal ,
I faced the two following issues;

  1. yarn global add @dhis2/cli
    when I ran that command, I got the error below:

Not sure the installation went well or not, I proceed and ran the following;
2) d2 cluster up 2.40.0.1 --db-version 2.40 --seed
there, I got the error below:

What should I replace “db” and “version” with?

Thank in advance for helping me sort this out.
Best regards.

1 Like

Hi @DAGBEMAMBOU

Thank you for your post. Please try again using the latest stable version:

d2 cluster up 2.40.7 --db-version 2.40 --seed

I think the issue you faced was when using the hotfix/patch version. 2.40.0.1 (doesn’t seem to work. I’ve created a PR for that page and it hopefully if the PR is accepted the page will update).

Thanks!

Hi @Gassim
Thank you for your reply.
I just tried again, but I’m still seeing the error message shown on the screnshot below;
issue3

Could you please confirm that I don’t need to replace “db” and “version” with specific values?

Hi @DAGBEMAMBOU

The command you entered is correct. I tested it in my system and it’s downloading the image without any issues - see GIF:
Untitled design (1)

So now we need to check your installation and configuration… I think as you pointed out, the issue started from the beginning:

can you check the yarn version? And see if d2 is actually recognized?
yarn -version
d2 -help

Thanks!

Hi @Gassim ,
Thanks for considering my concerns.
Please find below what I got after running yarn -version and d2 -help.



My d2 seems not to be the same as yours?!

FYI: the Ubuntu distribution that I’m using is identified as “jammy”