Closed ghost closed 3 years ago
@louisgtwo , try running the below commands. I suspect you have a cached version somewhere.
go clean -cache -modcache -i -r
go get -u github.com/greenpau/cni-plugins/cmd/cni-nftables-portmap@v1.0.6
go get -u github.com/greenpau/cni-plugins/cmd/cni-nftables-firewall@v1.0.6
Also, please post back your go version and environment:
go version
go env
$ go get -u github.com/greenpau/cni-plugins/cmd/cni-nftables-portmap@v1.0.6 go: cannot use path@version syntax in GOPATH mode
$ go version go version go1.15.8 linux/amd64
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/louisgtwo/.cache/go-build" GOENV="/home/louisgtwo/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/louisgtwo/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/louisgtwo/go" GOPRIVATE="" GOPROXY="direct" GOROOT="/usr/lib/golang" GOSUMDB="off" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" 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-build280175787=/tmp/go-build -gno-record-gcc-switches"
@louisgtwo , see how the error is go: cannot use path@version syntax in GOPATH mode
.
Basically you need to switch from GOPATH mode.
Try and report back.
GO111MODULE=on go get -u github.com/greenpau/cni-plugins/cmd/cni-nftables-portmap@v1.0.6
That did the trick, Thanks. Second problem fedora does not have /usr/local/lib/cni or /usr/lib/cni. Where do I mv these to?
Fedora has this dir. Is this the right place? $ ls /usr/libexec/cni/ bandwidth bridge dhcp dnsname firewall flannel host-device host-local ipvlan loopback macvlan portmap ptp sample sbr static tuning vlan vrf
Fedora has this dir. Is this the right place?
By default, CNI binaries are located in the following directories:
/usr/libexec/cni
: default binaries/usr/local/lib/cni
: local systemI would say put them in /usr/local/lib/cni
fedora 33 with golang-bin, what golang devel packages do I need?