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

Update README re: installing on linux; update to use go install and fix version tagging? #568

Closed
szeitlin opened this issue May 25, 2023 · 10 comments · Fixed by #574
Closed

Comments

@szeitlin
Copy link

sudo yum install golang works

but go get github.com/peak/s5cmd doesn't work because go get has been deprecated in favor of go install, which did not work for me on my first try.

Currently trying go install github.com/peak/s5cmd@latest but it's slow and I can't tell if it's working or not. I volunteer to make this update if/when I can get it to work.

@szeitlin
Copy link
Author

Looks like it's working, but slowly:
go: downloading github.com/peak/s5cmd v1.4.0

@szeitlin
Copy link
Author

go: github.com/peak/s5cmd@latest: Lock go/pkg/mod/cache/download/github.com/peak/s5cmd/@v/v1.4.0.lock: input/output error

@szeitlin
Copy link
Author

The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.

@szeitlin
Copy link
Author

szeitlin commented May 25, 2023

Looks like 2.0.0 is actually the latest stable release, so I don't know why go install chose 1.4.0 as "latest"...

Maybe because of this:

go: github.com/peak/s5cmd@v2.0.0: github.com/peak/s5cmd@v2.0.0: invalid version: resolves to version v0.0.0-20220701153011-35bb2fa9ee3d (v2.0.0 is not a tag)

@szeitlin
Copy link
Author

I ended up doing wget with the .tar.gz and then tar -xzf, chmod +x and I can run it as ./s5cmd which isn't exactly what I wanted, but it will work.

@szeitlin szeitlin changed the title Update README re: installing on linux Update README re: installing on linux; update to use go install and fix version tagging? May 25, 2023
@igungor
Copy link
Member

igungor commented Jun 19, 2023

go install ... doesn't work out of the box now but we plan to fix it with the next release, which I don't have ETA right now.

@igungor
Copy link
Member

igungor commented Jun 19, 2023

Relevant #556

@szeitlin
Copy link
Author

fwiw this is still not working for me, it says "downloading" all these things, but it doesn't seem to actually install anywhere.

@szeitlin
Copy link
Author

I had to do export PATH=${PATH}:go env GOPATH/bin to get s5md to show up as a command.

@seruman
Copy link
Member

seruman commented Sep 14, 2023

I had to do export PATH=${PATH}:go env GOPATH/bin to get s5md to show up as a command.

Hi @szeitlin,

This is because of your Go installation, not s5cmd. You can find information about this in the official Go installation documentation at https://go.dev/doc/install;

Linux:
Add /usr/local/go/bin to the PATH environment variable.
Mac:
The package should put the /usr/local/go/bin directory in your PATH environment variable.

As far as I know, if you install it on macOS using homebrew, it doesn't automatically add $GOPATH/bin to your PATH. At least, it didn't do so the last time I installed it.

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

Successfully merging a pull request may close this issue.

3 participants