uuid icon indicating copy to clipboard operation
uuid copied to clipboard

not able to install uuid package

Open helal-abbas opened this issue 2 years ago • 5 comments

RUN go install github.com/google/[email protected] or RUN go install github.com/google/uuid running these command but getting such error, RUN go install github.com/google/[email protected]: #10 0.943 go: downloading github.com/google/uuid v1.3.0 #10 2.980 package github.com/google/uuid is not a main package

executor failed running [/bin/sh -c go install github.com/google/[email protected]]: exit code: 1

please give me some solution for same

helal-abbas avatar Mar 25 '22 12:03 helal-abbas

This library is not command.

So, You should do go get github.com/google/uuid

The Readme also says so. https://github.com/google/uuid#readme

yuki2006 avatar Apr 05 '22 18:04 yuki2006

When I use go get-- I get an error: $go get github.com/google/uuid go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.

go version go1.18 linux/amd64 on Ubuntu 2004

andymend avatar Apr 11 '22 17:04 andymend

Don't use get or install, Just import github/google/uuid in the file, it will work

On Mon, 11 Apr, 2022, 11:26 pm andymend, @.***> wrote:

When I use go get-- I get an error: $go get github.com/google/uuid go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install @.***' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.

go version go1.18 linux/amd64 on Ubuntu 2004

— Reply to this email directly, view it on GitHub https://github.com/google/uuid/issues/99#issuecomment-1095357076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISUBWQ3C2VZJPCBBURCKZDVERRURANCNFSM5RUAM7FQ . You are receiving this because you authored the thread.Message ID: @.***>

helal-abbas avatar Apr 11 '22 18:04 helal-abbas

Don't use get or install, Just import github/google/uuid in the file, it will work

This does not work, the package needs to be installed otherwise it cannot be found and it can't be installed because it is not a main package

matt-culbert avatar Dec 05 '22 15:12 matt-culbert

When I use go get-- I get an error:

$go get github.com/google/uuid go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. go version go1.18 linux/amd64 on Ubuntu 2004

I was having the same problem and I discovered that u have to init a module so I run go mod init and go get github.com/google/uuid works good for me (I'm learning so do not judge me please 😂)

gabrielsolanha avatar Mar 06 '23 00:03 gabrielsolanha