I am attempting to upgrade my installed version of LND and getting this error:
make clean && make && make install
/bin/sh: 1: go: not found
/bin/sh: 1: go: not found
Cleaning source.
rm -f ./lnd-debug ./lncli-debug
rm -f ./lnd-itest ./lncli-itest
rm -f -r ./vendor .vendor-new
/bin/sh: 1: go: not found
/bin/sh: 1: go: not found
Building debug lnd and lncli.
GO111MODULE=on go build -v -tags="dev" -o lnd-debug -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=queue/v1.0.1-136-g6ad8be25e1aaf4700bd86303ae534cf36c6199bf" github.com/lightningnetwork/lnd
/bin/sh: 1: go: not found
Makefile:94: recipe for target 'build' failed
make: *** [build] Error 127
version of lnd lnd
version 0.5.2-99-beta commit=v0.5.1-beta-814-
g2a652455aaea661b147b6adca0ff51edcd268508
which operating system (uname -a on *Nix)
Ubuntu 16.04.6 x86_64
version of btcd, bitcoind, or other backend
bitcoind
Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.
Following the update instructions:
To update your version of lnd to the latest version run the following commands:
cd $GOPATH/src/github.com/lightningnetwork/lnd
git pull
make clean && make && make install
I expect to be update to update LND without error message.
I get the error message indicated above.
/bin/sh: 1: go: not found
The go binary is not in your PATH.
@wpaulino why isn't it? I followed the instructions exactly as written in this repo.
Check your PATH, you may have installed Go in a slightly different directory. Also you can do which go to find where it's pointing to atm.
As @Roasbeef suggested, use the following command to check your path setting:
echo $GOPATH # this should point to your workspace
echo $PATH
go version # check go version, it should be at least 1.12
gedit ~/.profile # to modify PATH
source ~/.profile # to activate changes
I also use Ubuntu so I know the struggle when configuring the Go. If all the above not working, I suggest you remove and install Go again, directly installing tar package. Installation guide here. Following is tested and worked perfectly fine on my Ubuntu 18.04
which go # output like /usr/local/go/bin/go
rm -rvf /usr/local/go/
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
Most helpful comment
As @Roasbeef suggested, use the following command to check your path setting:
I also use Ubuntu so I know the struggle when configuring the Go. If all the above not working, I suggest you remove and install Go again, directly installing
tarpackage. Installation guide here. Following is tested and worked perfectly fine on myUbuntu 18.04