skip to Main Content

I’m trying to install wails in Ubuntu 22.04.

Go version go1.20.3 and npm version 6.14.11 are already installed in my system.

I followed all steps from the official website tutorial https://wails.io/docs/gettingstarted/installation/.

there was no error all steps mentioned in above tutorial.

but when I try the following command

wails version

or

wails doctor

command it gives me the error

Command ‘wails’ not found

Some-one please help me to solve this issue

Thanks.

2

Answers


  1. Chosen as BEST ANSWER

    go is installed in my system

    when I run go version command it run correctly

    but the directory where go installed that is home/[username]/go/bin/ was not added in PATH environment.

    I followed these steps to add it in PATH environment

    1. opened the terminal

    2. open the ~/.bashrc file

      nano ~/.bashrc

    3. go to bottom of the file and add following line

      export PATH=$PATH:/home/[username]/go/bin/

    you should use the actual path of go/bin folder where the go is installed

    don't forget to add / at the end

    1. Press Ctrl + X to exit nano editor, and type "Y" to save changes.

    2. Finally run the following command

      source ~/.bashrc

    PATH is successfully added

    now when I run wails version command it don't give me an error.

    wails version command output


  2. It looks like an environement variable issue, take a look at the faq about that (https://wails.io/docs/guides/troubleshooting/#the-wails-command-appears-to-be-missing)

    Adding it to bashrc may not be enough to fix your issue, You should probably set your environement variables in .profile. Take a look at those awnsers explaining the avalible files used to set up environement varaibles https://serverfault.com/q/261802

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search