Skip to content

zsh: command not found: sqlc #2984

Closed
Closed

Description

@dmgcoding

Version

1.23.0

What happened?

I installed sqlc using go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest

If I run sqlc version it says
zsh: command not found: sqlc

my go version - go1.21.3 darwin/arm64

I'm a newbie to go. Do I have to add anything to path or something like that?

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

No response

What operating system are you using?

MacOS

What database engines are you using?

No response

What type of code are you generating?

No response

Activity

  1. added
    bugSomething isn't working
    triageNew issues that hasn't been reviewed
    on Nov 16, 2023
  2. davidorozcog commented on Nov 16, 2023

    @davidorozcog

    Hey @dmgcoding, one quick question, do you have set the $GOBIN env var set? Make sure you have it set

  3. dmgcoding commented on Nov 16, 2023

    @dmgcoding
    Author

    Hey @dmgcoding, one quick question, do you have set the $GOBIN env var set? Make sure you have it set

    what should the path be? to the go>bin folder?

  4. davidorozcog commented on Nov 16, 2023

    @davidorozcog

    The documentation suggest GOBIN=$GOPATH/bin, so yes go/bin should be good

    The directory where executables outside the Go distribution are installed using the go command. For example, go install golang.org/x/tools/cmd/godoc@latest downloads, builds, and installs $GOBIN/godoc. By default, $GOBIN is $GOPATH/bin (or $HOME/go/bin if GOPATH is not set). After installing, you will want to add this directory to your $PATH so you can use installed tools.

    Note that the Go distribution's executables are installed in $GOROOT/bin (for executables invoked by people) or $GOTOOLDIR (for executables invoked by the go command; defaults to $GOROOT/pkg/$GOOS_$GOARCH) instead of $GOBIN.

  5. locked and limited conversation to collaborators on Nov 16, 2023
  6. converted this issue into a discussion #2985 on Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions