Skip to content

Commit 2aab10e

Browse files
authored
docs: add go install troubleshooting subsection (#5)
Real user feedback: ran `go install` on macOS, c7search didn't appear. Almost always because $GOPATH/bin isn't on $PATH (Go's default install location is ~/go/bin, which macOS doesn't add to PATH automatically). Adds a Troubleshooting subsection right under "From source" covering: - Three diagnostic commands to identify which case you're in - The PATH fix (one-liner appended to ~/.zshrc) - Two failure modes that prevent install entirely (corporate proxy blocking proxy.golang.org, ~/go owned by root from a previous sudo install) The section is positioned where users will hit it: right after the go install command itself, before they scroll to the release-binary section. Co-authored-by: Kevin Burns <kevin-burns@users.noreply.github.com>
1 parent ca0dbf5 commit 2aab10e

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,51 @@ c7search version
8484
your machine, so it never receives the `com.apple.quarantine` extended
8585
attribute that browsers and `curl` set on downloaded files.
8686

87+
#### Troubleshooting: `c7search: command not found` after `go install`
88+
89+
The most common cause on macOS: the install succeeded, but
90+
`$GOPATH/bin` isn't on your `$PATH`. The binary is sitting in
91+
`~/go/bin/c7search` and your shell can't see it. Three quick checks:
92+
93+
```bash
94+
# 1. Where does Go put binaries on your machine?
95+
go env GOBIN GOPATH
96+
# If GOBIN is set, the binary is in $GOBIN.
97+
# If GOBIN is empty, it's in $(go env GOPATH)/bin (typically ~/go/bin).
98+
99+
# 2. Does the binary actually exist?
100+
ls -l "$(go env GOPATH)/bin/c7search"
101+
# Expected: -rwxr-xr-x ... ~/go/bin/c7search
102+
103+
# 3. Is that directory on your PATH?
104+
echo "$PATH" | tr ':' '\n' | grep -E '(/go/bin|GOBIN)'
105+
# If empty, that's your problem — fix below.
106+
```
107+
108+
If the binary exists but isn't on `$PATH`:
109+
110+
```bash
111+
echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >> ~/.zshrc
112+
source ~/.zshrc
113+
which c7search # should print ~/go/bin/c7search
114+
c7search version
115+
```
116+
117+
If the binary doesn't exist, the install failed silently. Re-run with
118+
`-v`:
119+
120+
```bash
121+
go install -v github.com/kevin-burns/c7search@v0.1.0 2>&1 | tail -20
122+
```
123+
124+
Common failure modes:
125+
126+
- **Corporate proxy** blocking `proxy.golang.org`
127+
`GOPROXY=direct go install github.com/kevin-burns/c7search@v0.1.0`
128+
(slower, bypasses the module proxy).
129+
- **`~/go` owned by root** from a previous `sudo go install`
130+
`sudo chown -R "$USER" ~/go`.
131+
87132
### From a release binary
88133

89134
Use this path if you don't have Go installed, or you want exactly the

0 commit comments

Comments
 (0)