Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to install uuid package #99

Open
helal-abbas opened this issue Mar 25, 2022 · 5 comments
Open

not able to install uuid package #99

helal-abbas opened this issue Mar 25, 2022 · 5 comments

Comments

@helal-abbas
Copy link

RUN go install github.com/google/uuid@v1.3.0 or RUN go install github.com/google/uuid running these command but getting such error,
RUN go install github.com/google/uuid@v1.3.0:
#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/uuid@v1.3.0]: exit code: 1

please give me some solution for same

@yuki2006
Copy link

yuki2006 commented Apr 5, 2022

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

@andymend
Copy link

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

@helal-abbas
Copy link
Author

helal-abbas commented Apr 11, 2022 via email

@matt-culbert
Copy link

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

@gabrielsolanha
Copy link

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 😂)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants