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

command 'pxl' not found #19

Open
aderchox opened this issue Jul 10, 2019 · 6 comments · May be fixed by #22
Open

command 'pxl' not found #19

aderchox opened this issue Jul 10, 2019 · 6 comments · May be fixed by #22

Comments

@aderchox
Copy link

aderchox commented Jul 10, 2019

I have GO installed and running and configured in the PATH as well.
I run this: go get github.com/ichinaski/pxl
It gives no error, by which I assume it's gotten installed fine without any errors(?).
Then I run this: pxl path/to/image
And I get this error:
Command "pxl" not found, did you mean...

@lachlanallison
Copy link

Old question but I experienced this issue as well.
I needed to reference the whole path to the pxl binary - ../go/bin/pxl. Otherwise you could add the binary to your PATH.

@ghost
Copy link

ghost commented Feb 9, 2020

Old question but I experienced this issue as well.
I needed to reference the whole path to the pxl binary - ../go/bin/pxl. Otherwise you could add the binary to your PATH.

@lachlanallison
could you please explain this? I have the issue as well

@lachlanallison
Copy link

@Myythaar when I did go get github.com/ichinaski/pxl it created a folder structure ../go/bin/pxl. To run pxl I had to either go into that subdirectory, reference the whole path (../go/bin/pxl filename) or add it to the PATH variables.

@brakkum
Copy link

brakkum commented May 1, 2021

Just to clarify, as I just ran into this, when you run go get|install it puts these in a directory in your home directory. So, adding something like export PATH=$HOME/go/bin/:$PATH to your .bashrc or .zshrc should fix the issue and make the program accessible.

@dchapes
Copy link

dchapes commented May 9, 2021

This (installing to $GOPATH/bin/) is standard Go behaviour. If you intend to use Go more more than just building/installing this one tool I'd recommend reading some of the Go documentation, e.g. How to Write Go Code where it mentions GOPATH and GOBIN and, in passing, setting your $PATH.

Alternatively, if you just care about building this one program and putting it somewhere you want you could do something like this (assuming you have a Go1.11+ module aware installation):

env GOBIN=/tmp go install github.com/ichinaski/pxl@latest

Where GOBIN is set to some directory where you want it installed.

I'd say that even though the README for this repository doesn't mention modules this isn't an issue since it does say: "You will need to have Go installed and configured in your path." Perhaps the README could be adjusted with the information/links I give above.

dchapes added a commit to dchapes/pxl that referenced this issue May 9, 2021
Should resolve ichinaski#18 and ichinaski#20.

Also, add go.mod and go.sum for Go module support.

While adjusting the README for the above changes,
also expand on installation paths which should resolve ichinaski#19.
@bieli
Copy link

bieli commented Oct 3, 2023

@aderchox You can run with below a few lines from forked/updated repo:

git clone https://github.com/dchapes/pxl.git
cd pxl
go build cmd/pxl/main.go

# you can see main binary file
./main -h
Usage: ./pxl <filename>...

Close the image with <ESC> or by pressing 'q'.

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.

5 participants