我通过snap安装了go;现在如何调用pup?
thufir@dur:~/pup$
thufir@dur:~/pup$ go get github.com/ericchiang/pup
thufir@dur:~/pup$
thufir@dur:~/pup$ curl "skynet.be/nieuws-sport/weer/mijn-weer?cityId=6450" | pup 'div.tides' >out.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Command 'pup' not found, but there are 17 similar ones.
100 268 100 268 0 0 740 0 --:--:-- --:--:-- --:--:-- 740
(23) Failed writing body
thufir@dur:~/pup$
thufir@dur:~/pup$ cat out.html
thufir@dur:~/pup$
thufir@dur:~/pup$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
thufir@dur:~/pup$ 实际上,不确定它是否已安装:
thufir@dur:~/pup$
thufir@dur:~/pup$ go list
can't load package: package .: no Go files in /home/thufir/pup
thufir@dur:~/pup$
thufir@dur:~/pup$ go version
go version go1.11.4 linux/amd64
thufir@dur:~/pup$ thufir@dur:~/pup$
thufir@dur:~/pup$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/thufir/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/thufir/go"
GOPROXY=""
GORACE=""
GOROOT="/snap/go/3095"
GOTMPDIR=""
GOTOOLDIR="/snap/go/3095/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build303962824=/tmp/go-build -gno-record-gcc-switches"
thufir@dur:~/pup$ 我试着从pup上运行~/go/,但是得到了相同的结果。
发布于 2019-04-04 02:38:53
我也有同样的问题想要安装小狗。
你必须遵循以下步骤:
export GOROOT=/usr/bin/go (运行whereis go的路径)cd /home/thufir/go,您将在bin文件夹和pup二进制文件中找到一个<>bin文件夹。sudo cp pup /usr/binpup --version,我希望它能工作。https://askubuntu.com/questions/1107325
复制相似问题