<p>Since <code>/usr/local/go/bin</code> is in your path, that is probably where you should have <code>go</code> install the programs it compiles. However it isn't clear how you have <code>go</code> set up. Normally the go language tools would be kept separate from the go programs you compile and install.</p>
<p>Nevertheless, if the <code>make</code> command didn't emit error messages, go has compiled lnd and installed it somewhere (usually based on whatever value you had assigned to $GOPATH at that time).</p>
<p>I would find lnd using the following commands  ...</p>
<pre><code>find /home/ayoub -name lnd
find /usr/local -name lnd
</code></pre>
<p>and then <code>mv</code> it to <code>/usr/local/go/bin/lnd</code></p>
<p>I would also check ownership and permissions.</p>

CC BY-SA 4.0
2022-05-12T14:14:27.513Z
2022-05-12T14:14:27.513Z
RedGrittyBrick
<p>I tried installing lnd using the commands shown in the <a href="https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md" rel="nofollow noreferrer">installation guide</a>.
I used these commands:</p>
<pre><code>git clone https://github.com/lightningnetwork/lnd
cd lnd
make install
</code></pre>
<p>but when I try running the lnd command, I get this:</p>
<pre><code>Command 'lnd' not found
</code></pre>
<p>I have go1.18.1 installed. I did execute these commands, but nothing changed:</p>
<pre><code>export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
</code></pre>
<p>Here are the <code>$GOPATH</code> and <code>$PATH</code> variables:</p>
<pre><code>echo $GOPATH 
/usr/local/go
</code></pre>
<pre><code>echo $PATH
/home/ayoub/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ayoub/.dotnet/tools:/usr/local/go/bin:/usr/local/go/bin
</code></pre>
<p>How can I solve this issue?
I am running Ubuntu 20.04.</p>
<p>edit: Here is the output of <code>sudo make install</code>:</p>
<pre><code>go install -v -tags=&quot;&quot; -ldflags &quot; -s -w -X github.com/lightningnetwork/lnd/build.Commit=v0.14.3-beta -X github.com/lightningnetwork/lnd/build.CommitHash=bd0c46b4fcb027af1915bd67a3da70e8ca5c6efe -X github.com/lightningnetwork/lnd/build.GoVersion=go1.18.1 -X github.com/lightningnetwork/lnd/build.RawTags=&quot; github.com/lightningnetwork/lnd/cmd/lnd
</code></pre>

CC BY-SA 4.0
2022-05-12T12:42:48.950Z
1) What was the output from `make install` - were there any error messages?  2) you must have done something in between `export GOPATH=~/go` and `echo $GOPATH` to get `/usr/local/go` instead of `/home/ayoub/go` - what did you do exactly? 3) What is the output of `type go`?
RedGrittyBrick
CC BY-SA 4.0
2022-05-12T13:11:16.680Z
1) I added the output in the question
2) I had `GOPATH` written in my `~/.bashrc`, but even after removing it and re running the `export GOPATH=~/go` command nothing changed
3) the output of `type go` is `go is /usr/local/go/bin/go`
AidenFive
<lightning-network-daemon><ubuntu><bash>
Command lnd not found even after installing lnd
AidenFive
# Command lnd not found even after installing lnd

(Asked by: username_0 on 2022-05-11)

I tried installing lnd using the commands shown in the [installation guide](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md).
I used these commands:

```
git clone https://github.com/lightningnetwork/lnd
cd lnd
make install

```

but when I try running the lnd command, I get this:

```
Command 'lnd' not found

```

I have go1.18.1 installed. I did execute these commands, but nothing changed:

```
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin

```

Here are the `$GOPATH` and `$PATH` variables:

```
echo $GOPATH 
/usr/local/go

```

```
echo $PATH
/home/ayoub/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ayoub/.dotnet/tools:/usr/local/go/bin:/usr/local/go/bin

```

How can I solve this issue?
I am running Ubuntu 20.04.

edit: Here is the output of `sudo make install`:

```
go install -v -tags="" -ldflags " -s -w -X github.com/lightningnetwork/lnd/build.Commit=v0.14.3-beta -X github.com/lightningnetwork/lnd/build.CommitHash=bd0c46b4fcb027af1915bd67a3da70e8ca5c6efe -X github.com/lightningnetwork/lnd/build.GoVersion=go1.18.1 -X github.com/lightningnetwork/lnd/build.RawTags=" github.com/lightningnetwork/lnd/cmd/lnd

```

**Tags:** lightning-network-daemon, ubuntu, bash

> **Comments:**
> **username_1**: 1) What was the output from `make install` - were there any error messages?  2) you must have done something in between `export GOPATH=~/go` and `echo $GOPATH` to get `/usr/local/go` instead of `/home/ayoub/go` - what did you do exactly? 3) What is the output of `type go`?  
> **username_0**: 1) I added the output in the question 2) I had `GOPATH` written in my `~/.bashrc`, but even after removing it and re running the `export GOPATH=~/go` command nothing changed 3) the output of `type go` is `go is /usr/local/go/bin/go`  

---

## 1 answers

### Answer by username_1 on 2022-05-12. Score: 0 | Accepted answer

Since `/usr/local/go/bin` is in your path, that is probably where you should have `go` install the programs it compiles. However it isn't clear how you have `go` set up. Normally the go language tools would be kept separate from the go programs you compile and install.

Nevertheless, if the `make` command didn't emit error messages, go has compiled lnd and installed it somewhere (usually based on whatever value you had assigned to $GOPATH at that time).

I would find lnd using the following commands ...

```
find /home/ayoub -name lnd
find /usr/local -name lnd

```

and then `mv` it to `/usr/local/go/bin/lnd`

I would also check ownership and permissions.


---

