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
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
opened the terminal
open the ~/.bashrc file
nano ~/.bashrc
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
Press Ctrl + X to exit nano editor, and type "Y" to save changes.
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.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