Getting a lot of cannot find package errors after go install . ./cmd/... command


After installing and successfully testing golang on my Slackware 14.2 64bit machine following “Getting started tutorial”, I am experiencing some problems using go install . ./cmd/... command to complete installation of lightning network deamon (for short lnd) written in go.

According to lnd installation guide:

  1. Install Go version higher than 1.8
  2. Setup environment variable

export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin

  1. Install Glide
    go get -u
  2. Install lnd itself

git clone $GOPATH/src/
cd $GOPATH/src/
glide install
go install . ./cmd/…

The last command returns a lot of “cannot find package” lines:

tenev@~/gocode/src/$ go install . ./cmd/…
breacharbiter.go:12:2: cannot find package “” in any of:
/usr/src/ (from $GOROOT)
/home/tenev/gocode/src/ (from $GOPATH)

Note: this is not the complete error message but it is like this until the end.

I suspect that I have not setup correctly some environment variable but not sure how to debug it.
Checked above mentioned folders and did not find required packages but also saw that glide install is successfully fetching some packages.

Could you please suggest how to debug this issue?

Try running the file containing the main function and see if you are getting the same errors.
go run main.go

If you are still getting the errors that means you need to check your paths. Recheck if they are pointing to the correct folders.

As I understand go for slackware might be hopelessly outdated. Please make sure you are running at least version 1.8 as mentioned in your referenced install instructions.

Or how did you install golang?

Tried twice, first time using package prepared for Slackware from Slackbuilds, second time using the binaries from golang and following the “Getting Started Tutorial and Test” to verify installation.

Whats the outoput of go version? What was the output of glide install?

go version

tenev@~/gocode/src/$ go version
go version go1.4.2 gccgo (GCC) 5.3.0 linux/amd64

glide install

> tenev@~/gocode/src/$ glide install
> [INFO]  Downloading dependencies. Please wait...
> [INFO]  --> Found desired version locally d31a916ded42d1640b9d89a26f8abd53cc96790c!
> [INFO]  --> Found desired version locally e404fcfc888570cadd1610538e2dbc89f66af814!
> [INFO]  --> Found desired version locally 9d8c9780eb4766351ae8489f78cb940cb6e0503d!
> [INFO]  --> Found desired version locally 2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8!
> [INFO]  --> Found desired version locally 84c8d2346e9fc8c7b947e243b9c24e6df9fd206a!
> [INFO]  --> Found desired version locally 637e656429416087660c84436a2a035d69d54e2e!
> [INFO]  --> Found desired version locally 4720035b7bfd2a9bb130b1c184f8bbe41b6f0d0f!
> [INFO]  --> Found desired version locally 53f62d9b43e87a6c56975cf862af7edf33a8d0df!
> [INFO]  --> Found desired version locally 31079b6807923eb23992c421b114992b95131b55!
> [INFO]  --> Found desired version locally ecdeabc65495df2dec95d7c4a4c3e021903035e5!
> [INFO]  --> Found desired version locally 8fa88b06e5974e97fbf9899a7f86a344bfd1f105!
> [INFO]  --> Found desired version locally ab9f9a6dab164b7d1246e0e688b0ab7b94d8553e!
> [INFO]  --> Found desired version locally f2862b476edcef83412c7af8687c9cd8e4097c0f!
> [INFO]  --> Found desired version locally bf9dde6d0d2c004a008c27aaee91170c786f6db8!
> [INFO]  --> Found desired version locally f88afde2fa19a30cf50ba4b05b3d13bc6bae3079!
> [INFO]  --> Found desired version locally a93b200c26cbae3bb09dd0dc2c7c7fe1468a034a!
> [INFO]  --> Found desired version locally 8232ab8918d91c72af1a9fb94d3edbe31d88b790!
> [INFO]  --> Found desired version locally f391b8402d23024e7c0f624b31267a89998fca95!
> [INFO]  --> Found desired version locally 0d266ba6d55ea65c18c7a02d8992c89355149e80!
> [INFO]  --> Found desired version locally 6c8f30a130bb170348ceb754ce4204156efe2741!
> [INFO]  --> Found desired version locally 18bf6612a0653a21daf1a08b4a59e54670a524a1!
> [INFO]  --> Found desired version locally 5f654d5faab99ee2b3488fabba98e5f7a5257ee3!
> [INFO]  --> Found desired version locally 946bd9fbed05568b0f3cd188353d8aa28f38b688!
> [INFO]  --> Found desired version locally 9978b939c33973be19b932fa7b936079bb7ba38d!
> [INFO]  --> Found desired version locally d0f4db8b4dad0ca3d569b804f21247c3dd96acbb!
> [INFO]  --> Found desired version locally c3ff179366044979fb9856c2feb79bd4c2184c7a!
> [INFO]  --> Found desired version locally 4f4765c3e3baf4c7b40c311340a076ec83c5ef3a!
> [INFO]  --> Found desired version locally 6724a57986aff9bff1a1770e9347036def7c89f6!
> [INFO]  --> Found desired version locally 501572607d0273fc75b3b261fa4904d63f6ffa0e!
> [INFO]  --> Found desired version locally cfb38830724cc34fedffe9a2a29fb54fa9169cd1!
> [INFO]  --> Found desired version locally 9419663f5a44be8b34ca85f08abc5fe1be11f8a3!
> [INFO]  --> Found desired version locally 66aacef3dd8a676686c7ae3716979581e8b03c47!
> [INFO]  --> Found desired version locally ab9e364efd8b52800ff7ee48a9ffba4e0ed78dfb!
> [INFO]  --> Found desired version locally 18c65dde6afd36dbc39197ca72008895b8dfbfb6!
> [INFO]  --> Found desired version locally ee236bd376b077c7a89f260c026c4735b195e459!
> [INFO]  --> Found desired version locally b3ddf786825de56a4178401b7e174ee332173b66!
> [INFO]  --> Found desired version locally 442357a80af5c6bf9b6d51ae791a39c3421004f3!
> [INFO]  --> Found desired version locally 04cf5ef151a211d929975161aea7c65f94c90446!
> [INFO]  --> Found desired version locally bed2a428da6e56d950bed5b41fcbae3141e5b0d0!
> [INFO]  Setting references.
> [INFO]  --> Setting version for to bf9dde6d0d2c004a008c27aaee91170c786f6db8.
> [INFO]  --> Setting version for to 84c8d2346e9fc8c7b947e243b9c24e6df9fd206a.
> [INFO]  --> Setting version for to 31079b6807923eb23992c421b114992b95131b55.
> [INFO]  --> Setting version for to e404fcfc888570cadd1610538e2dbc89f66af814.
> [INFO]  --> Setting version for to 53f62d9b43e87a6c56975cf862af7edf33a8d0df.
> [INFO]  --> Setting version for to ecdeabc65495df2dec95d7c4a4c3e021903035e5.
> [INFO]  --> Setting version for to 4720035b7bfd2a9bb130b1c184f8bbe41b6f0d0f.
> [INFO]  --> Setting version for to 8fa88b06e5974e97fbf9899a7f86a344bfd1f105.
> [INFO]  --> Setting version for to ab9f9a6dab164b7d1246e0e688b0ab7b94d8553e.
> [INFO]  --> Setting version for to f88afde2fa19a30cf50ba4b05b3d13bc6bae3079.
> [INFO]  --> Setting version for to 9d8c9780eb4766351ae8489f78cb940cb6e0503d.
> [INFO]  --> Setting version for to f2862b476edcef83412c7af8687c9cd8e4097c0f.
> [INFO]  --> Setting version for to d31a916ded42d1640b9d89a26f8abd53cc96790c.
> [INFO]  --> Setting version for to 2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8.
> [INFO]  --> Setting version for to 8232ab8918d91c72af1a9fb94d3edbe31d88b790.
> [INFO]  --> Setting version for to 637e656429416087660c84436a2a035d69d54e2e.
> [INFO]  --> Setting version for to 0d266ba6d55ea65c18c7a02d8992c89355149e80.
> [INFO]  --> Setting version for to a93b200c26cbae3bb09dd0dc2c7c7fe1468a034a.
> [INFO]  --> Setting version for to f391b8402d23024e7c0f624b31267a89998fca95.
> [INFO]  --> Setting version for to 6c8f30a130bb170348ceb754ce4204156efe2741.
> [INFO]  --> Setting version for to 18bf6612a0653a21daf1a08b4a59e54670a524a1.
> [INFO]  --> Setting version for to 9978b939c33973be19b932fa7b936079bb7ba38d.
> [INFO]  --> Setting version for to 946bd9fbed05568b0f3cd188353d8aa28f38b688.
> [INFO]  --> Setting version for to c3ff179366044979fb9856c2feb79bd4c2184c7a.
> [INFO]  --> Setting version for to 5f654d5faab99ee2b3488fabba98e5f7a5257ee3.
> [INFO]  --> Setting version for to d0f4db8b4dad0ca3d569b804f21247c3dd96acbb.
> [INFO]  --> Setting version for to 4f4765c3e3baf4c7b40c311340a076ec83c5ef3a.
> [INFO]  --> Setting version for to cfb38830724cc34fedffe9a2a29fb54fa9169cd1.
> [INFO]  --> Setting version for to 501572607d0273fc75b3b261fa4904d63f6ffa0e.
> [INFO]  --> Setting version for to 6724a57986aff9bff1a1770e9347036def7c89f6.
> [INFO]  --> Setting version for to 9419663f5a44be8b34ca85f08abc5fe1be11f8a3.
> [INFO]  --> Setting version for to ee236bd376b077c7a89f260c026c4735b195e459.
> [INFO]  --> Setting version for to 66aacef3dd8a676686c7ae3716979581e8b03c47.
> [INFO]  --> Setting version for to 442357a80af5c6bf9b6d51ae791a39c3421004f3.
> [INFO]  --> Setting version for to 18c65dde6afd36dbc39197ca72008895b8dfbfb6.
> [INFO]  --> Setting version for to b3ddf786825de56a4178401b7e174ee332173b66.
> [INFO]  --> Setting version for to ab9e364efd8b52800ff7ee48a9ffba4e0ed78dfb.
> [INFO]  --> Setting version for to 04cf5ef151a211d929975161aea7c65f94c90446.
> [INFO]  --> Setting version for to bed2a428da6e56d950bed5b41fcbae3141e5b0d0.
> [INFO]  Exporting resolved dependencies...
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  --> Exporting
> [INFO]  Replacing existing vendor dependenciesThis text will be hidden


  1. Glide uses the vednor dir to pin dependencies. Vendoring is only supported since go 1.5 (as experimental feature) and stable since 1.7 IIRC
  2. The program you want to compile does need at least version 1.8 according to its own documentation.

Please install an appropriate version for your system from

Thank you for helping, now it is clear to me what is the problem.

I’ve also saw go1.4.2 but got confused since I downloaded and installed 1.9.3 package.

Actually the root cause is that according to the “Getting started tutorial” I am extracting the binaries of go1.9.3 to /usr/local/go/, then adding this path to my $PATH variable.
The problem is that I already have go with my distribution probably coming with package gccgo (GCC) 5.3.0 linux/amd64 and installed in /usr/bin.
Since /usr/bin is first in my $PATH variable, go1.4.2 is always executed.

After running the command reporting the error using full path to go1.9.3 it was ok.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.