[GH-ISSUE #228] [BUG] Too many errors when trying to install asynq command line tool on OSX #84

Closed
opened 2026-03-02 05:18:31 +03:00 by kerem · 3 comments
Owner

Originally created by @f-ld on GitHub (Jan 19, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/228

Originally assigned to: @hibiken on GitHub.

Describe the bug
Trying to install the command line tool fails on OSX

To Reproduce
Run:

go get github.com/hibiken/asynq/tools/asynq

as documented in github.com/hibiken/asynq@00a25ca570/tools/asynq/README.md

Expected behavior
The tool is installed in $GOPATH/bin

Obderved behavior
Got the too many errors output:

go: downloading github.com/hibiken/asynq v0.14.0
go: downloading github.com/hibiken/asynq/tools v0.0.0-20210114144936-42c7ac074650
go: found github.com/hibiken/asynq/tools/asynq in github.com/hibiken/asynq/tools v0.0.0-20210114144936-42c7ac074650
go: downloading github.com/hibiken/asynq v0.4.0
go: downloading github.com/spf13/viper v1.6.2
go: downloading github.com/spf13/cobra v1.0.0
go: downloading github.com/fatih/color v1.9.0
go: downloading github.com/rs/xid v1.2.1
go: downloading gopkg.in/ini.v1 v1.51.0
go: downloading github.com/pelletier/go-toml v1.6.0
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/magiconair/properties v1.8.1
go: downloading golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e
go: downloading github.com/subosito/gotenv v1.2.0
# github.com/hibiken/asynq/tools/asynq/cmd
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/cron.go:111:13: undefined: asynq.PageSize
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/cron.go:111:39: undefined: asynq.Page
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:24:74: undefined: base.Version
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:93:62: undefined: base.ScheduledKey
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:97:58: undefined: base.RetryKey
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/queue.go:144:25: undefined: asynq.QueueStats
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/queue.go:194:31: undefined: asynq.DailyStats
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:43:11: undefined: base.Version
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:46:55: undefined: base.Version
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:138:25: undefined: asynq.Inspector
../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:97:58: too many errors```

**Environment (please complete the following information):**
 - OS: OSX 10.15.7
 - Version of `asynq` package: see output logs above
 - Golang version:
```$ go version
go version go1.15.2 darwin/amd64

Additional context
Also tried:

$ cd go/src/github.com/
$ git clone git@github.com:hibiken/asynq.git
$ cd asynq/
$ git log -v -1
commit 42c7ac07465076b1d575fc0f773e40025d2f5b1c (HEAD -> master, tag: v0.14.0, origin/master, origin/HEAD)
Author: Ken Hibino <ken.hibino7@gmail.com>
Date:   Thu Jan 14 06:49:36 2021 -0800

    v0.14.0
$ cd tools/asynq/
$ go build 
go: downloading github.com/spf13/afero v1.1.2
$ ./asynq 
Asynq is a montoring CLI to inspect tasks and queues managed by asynq.

Usage:
  asynq [command]

Available Commands:
  cron        Manage cron
  help        Help about any command
  migrate     Migrate all tasks to be compatible with asynq v0.14.0
  queue       Manage queues
  server      Manage servers
  stats       Shows current state of the tasks and queues
  task        Manage tasks

Flags:
      --cluster                connect to redis cluster
      --cluster_addrs string   list of comma-separated redis server addresses (default "127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003,127.0.0.1:7004,127.0.0.1:7005")
      --config string          config file to set flag defaut values (default is $HOME/.asynq.yaml)
  -n, --db int                 redis database number (default is 0)
  -h, --help                   help for asynq
  -p, --password string        password to use when connecting to redis server
      --tls_server string      server name for TLS validation
  -u, --uri string             redis server URI (default "127.0.0.1:6379")
  -v, --version                version for asynq

Use "asynq [command] --help" for more information about a command.

so working from git repo.

Originally created by @f-ld on GitHub (Jan 19, 2021). Original GitHub issue: https://github.com/hibiken/asynq/issues/228 Originally assigned to: @hibiken on GitHub. **Describe the bug** Trying to install the command line tool fails on OSX **To Reproduce** Run: ``` go get github.com/hibiken/asynq/tools/asynq ``` as documented in https://github.com/hibiken/asynq/blob/00a25ca57040b24830b3ce8af1720cce02864fc6/tools/asynq/README.md **Expected behavior** The tool is installed in `$GOPATH/bin` **Obderved behavior** Got the `too many errors` output: ```$ go get github.com/hibiken/asynq/tools/asynq go: downloading github.com/hibiken/asynq v0.14.0 go: downloading github.com/hibiken/asynq/tools v0.0.0-20210114144936-42c7ac074650 go: found github.com/hibiken/asynq/tools/asynq in github.com/hibiken/asynq/tools v0.0.0-20210114144936-42c7ac074650 go: downloading github.com/hibiken/asynq v0.4.0 go: downloading github.com/spf13/viper v1.6.2 go: downloading github.com/spf13/cobra v1.0.0 go: downloading github.com/fatih/color v1.9.0 go: downloading github.com/rs/xid v1.2.1 go: downloading gopkg.in/ini.v1 v1.51.0 go: downloading github.com/pelletier/go-toml v1.6.0 go: downloading github.com/spf13/jwalterweatherman v1.1.0 go: downloading github.com/magiconair/properties v1.8.1 go: downloading golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e go: downloading github.com/subosito/gotenv v1.2.0 # github.com/hibiken/asynq/tools/asynq/cmd ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/cron.go:111:13: undefined: asynq.PageSize ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/cron.go:111:39: undefined: asynq.Page ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:24:74: undefined: base.Version ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:93:62: undefined: base.ScheduledKey ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:97:58: undefined: base.RetryKey ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/queue.go:144:25: undefined: asynq.QueueStats ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/queue.go:194:31: undefined: asynq.DailyStats ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:43:11: undefined: base.Version ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:46:55: undefined: base.Version ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/root.go:138:25: undefined: asynq.Inspector ../../../../go/pkg/mod/github.com/hibiken/asynq/tools@v0.0.0-20210114144936-42c7ac074650/asynq/cmd/migrate.go:97:58: too many errors``` **Environment (please complete the following information):** - OS: OSX 10.15.7 - Version of `asynq` package: see output logs above - Golang version: ```$ go version go version go1.15.2 darwin/amd64 ``` **Additional context** Also tried: ``` $ cd go/src/github.com/ $ git clone git@github.com:hibiken/asynq.git $ cd asynq/ $ git log -v -1 commit 42c7ac07465076b1d575fc0f773e40025d2f5b1c (HEAD -> master, tag: v0.14.0, origin/master, origin/HEAD) Author: Ken Hibino <ken.hibino7@gmail.com> Date: Thu Jan 14 06:49:36 2021 -0800 v0.14.0 $ cd tools/asynq/ $ go build go: downloading github.com/spf13/afero v1.1.2 $ ./asynq Asynq is a montoring CLI to inspect tasks and queues managed by asynq. Usage: asynq [command] Available Commands: cron Manage cron help Help about any command migrate Migrate all tasks to be compatible with asynq v0.14.0 queue Manage queues server Manage servers stats Shows current state of the tasks and queues task Manage tasks Flags: --cluster connect to redis cluster --cluster_addrs string list of comma-separated redis server addresses (default "127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003,127.0.0.1:7004,127.0.0.1:7005") --config string config file to set flag defaut values (default is $HOME/.asynq.yaml) -n, --db int redis database number (default is 0) -h, --help help for asynq -p, --password string password to use when connecting to redis server --tls_server string server name for TLS validation -u, --uri string redis server URI (default "127.0.0.1:6379") -v, --version version for asynq Use "asynq [command] --help" for more information about a command. ``` so working from git repo.
kerem 2026-03-02 05:18:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@hibiken commented on GitHub (Jan 19, 2021):

Hi @f-ld Thank you for reporting this issue!

I'm actually not 100% sure why this is happening.
Would you mind initializing a go module and install the dependencies from there?
What I mean is this:

go mod init asynq-test
go get github.com/hibiken/asynq
go get github.com/hibiken/asynq/tools/asynq

At least on my machine, this seems to solve the problem. Let me know if this works!

<!-- gh-comment-id:762890363 --> @hibiken commented on GitHub (Jan 19, 2021): Hi @f-ld Thank you for reporting this issue! I'm actually not 100% sure why this is happening. Would you mind initializing a go module and install the dependencies from there? What I mean is this: ```sh go mod init asynq-test go get github.com/hibiken/asynq go get github.com/hibiken/asynq/tools/asynq ``` At least on my machine, this seems to solve the problem. Let me know if this works!
Author
Owner

@hibiken commented on GitHub (Feb 1, 2021):

I'll close this issue for now. @f-ld Please let me know if you are still having trouble.

<!-- gh-comment-id:770611632 --> @hibiken commented on GitHub (Feb 1, 2021): I'll close this issue for now. @f-ld Please let me know if you are still having trouble.
Author
Owner

@f-ld commented on GitHub (Feb 2, 2021):

Sorry for the late response: yes, works for me now.
Thank you

<!-- gh-comment-id:771874048 --> @f-ld commented on GitHub (Feb 2, 2021): Sorry for the late response: yes, works for me now. Thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#84
No description provided.