zzh@ZZHPC:/zdata/Github/greenlight$ go install honnef.co/go/tools/cmd/staticcheck no required module provides package honnef.co/go/tools/cmd/staticcheck; to add it: go get honnef.co/go/tools/cmd/staticcheck zzh@ZZHPC:/zdata/Github/greenlight$ go install honnef.co/go/tools/cmd/staticcheck@latest zzh@ZZHPC:/zdata/Github/greenlight$ go install github.com/rakyll/hey no required module provides package github.com/rakyll/hey; to add it: go get github.com/rakyll/hey zzh@ZZHPC:/zdata/Github/greenlight$ go install github.com/rakyll/hey@latest zzh@ZZHPC:/zdata/Github/greenlight$
It seems @latest is necessary.
zzh@ZZHPC:/zdata/Github/greenlight$ which hey zzh@ZZHPC:/zdata/Github/greenlight$ which staticcheck /home/zzh/.goenv/shims/staticcheck zzh@ZZHPC:/zdata/Github/greenlight$ cd /home/zzh/.goenv/shims/ zzh@ZZHPC:~/.goenv/shims$ lh hey ls: cannot access 'hey': No such file or directory zzh@ZZHPC:~/.goenv/shims$ lh staticcheck -rwxrwxr-x 1 zzh zzh 394 Aug 28 14:06 staticcheck
It seems either hey or staticcheck was installed successfully by the 'go install' commands.
zzh@ZZHPC:~$ sudo apt install hey Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: hey 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 2,016 kB of archives. After this operation, 6,775 kB of additional disk space will be used. Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 hey amd64 0.1.4-1 [2,016 kB] Fetched 2,016 kB in 2s (851 kB/s) Selecting previously unselected package hey. (Reading database ... 402743 files and directories currently installed.) Preparing to unpack .../archives/hey_0.1.4-1_amd64.deb ... Unpacking hey (0.1.4-1) ... Setting up hey (0.1.4-1) ... Processing triggers for man-db (2.10.2-1) ... zzh@ZZHPC:~$
标签:...,ZZHPC,staticcheck,hey,go,install,zzh,Go From: https://www.cnblogs.com/zhangzhihui/p/18577362