Проблема установки балансировщика нагрузки Seesaw? - PullRequest
0 голосов
/ 04 октября 2018

Я нахожусь в процессе установки качелей, используя следующую ссылку:

https://github.com/google/seesaw

, поскольку для установки требуется язык go, я установил его, но когда я пытаюсь выполнить шаги, которые ясталкиваются со следующими ошибками:

root@node1:/home/balancer/seesaw# go get -u golang.org/x/crypto/ssh
import cycle not allowed
package golang.org/x/crypto/ssh
        imports bufio
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
root@node1:/home/balancer/seesaw# go get -u github.com/dlintw/goconf
import cycle not allowed
package github.com/dlintw/goconf
        imports bufio
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
root@node1:/home/balancer/seesaw# go get -u github.com/golang/glog
import cycle not allowed
package github.com/golang/glog
        imports bufio
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
root@node1:/home/balancer/seesaw# go get -u github.com/miekg/dns
import cycle not allowed
package github.com/miekg/dns
        imports bufio
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
root@node1:/home/balancer/seesaw# go get -u github.com/kylelemons/godebug/pretty
import cycle not allowed
package github.com/kylelemons/godebug/pretty
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
root@node1:/home/balancer/seesaw# make test
go build ./...
binaries/seesaw_cli/main.go:31:2: cannot find package "github.com/google/seesaw/cli" in any of:
        /usr/local/go/src/github.com/google/seesaw/cli (from $GOROOT)
        /root/go/src/github.com/google/seesaw/cli (from $GOPATH)
binaries/seesaw_cli/main.go:32:2: cannot find package "github.com/google/seesaw/common/conn" in any of:
        /usr/local/go/src/github.com/google/seesaw/common/conn (from $GOROOT)
        /root/go/src/github.com/google/seesaw/common/conn (from $GOPATH)
binaries/seesaw_cli/main.go:33:2: cannot find package "github.com/google/seesaw/common/ipc" in any of:
        /usr/local/go/src/github.com/google/seesaw/common/ipc (from $GOROOT)
        /root/go/src/github.com/google/seesaw/common/ipc (from $GOPATH)
binaries/seesaw_cli/main.go:34:2: cannot find package "github.com/google/seesaw/common/seesaw" in any of:
        /usr/local/go/src/github.com/google/seesaw/common/seesaw (from $GOROOT)
        /root/go/src/github.com/google/seesaw/common/seesaw (from $GOPATH)
import cycle not allowed
package ./binaries/seesaw_cli
        imports flag
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime
binaries/seesaw_ecu/main.go:24:2: cannot find package "github.com/google/seesaw/common/server" in any of:
        /usr/local/go/src/github.com/google/seesaw/common/server (from $GOROOT)
        /root/go/src/github.com/google/seesaw/common/server (from $GOPATH)
binaries/seesaw_ecu/main.go:25:2: cannot find package "github.com/google/seesaw/ecu" in any of:
        /usr/local/go/src/github.com/google/seesaw/ecu (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ecu (from $GOPATH)
binaries/seesaw_engine/main.go:30:2: cannot find package "github.com/google/seesaw/engine" in any of:
        /usr/local/go/src/github.com/google/seesaw/engine (from $GOROOT)
        /root/go/src/github.com/google/seesaw/engine (from $GOPATH)
binaries/seesaw_engine/main.go:29:2: cannot find package "github.com/google/seesaw/engine/config" in any of:
        /usr/local/go/src/github.com/google/seesaw/engine/config (from $GOROOT)
        /root/go/src/github.com/google/seesaw/engine/config (from $GOPATH)
binaries/seesaw_ha/main.go:27:2: cannot find package "github.com/google/seesaw/ha" in any of:
        /usr/local/go/src/github.com/google/seesaw/ha (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ha (from $GOPATH)
binaries/seesaw_healthcheck/main.go:26:2: cannot find package "github.com/google/seesaw/healthcheck" in any of:
        /usr/local/go/src/github.com/google/seesaw/healthcheck (from $GOROOT)
        /root/go/src/github.com/google/seesaw/healthcheck (from $GOPATH)
binaries/seesaw_ncc/main.go:33:2: cannot find package "github.com/google/seesaw/ncc" in any of:
        /usr/local/go/src/github.com/google/seesaw/ncc (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ncc (from $GOPATH)
binaries/seesaw_watchdog/main.go:27:2: cannot find package "github.com/google/seesaw/watchdog" in any of:
        /usr/local/go/src/github.com/google/seesaw/watchdog (from $GOROOT)
        /root/go/src/github.com/google/seesaw/watchdog (from $GOPATH)
cli/show.go:29:2: cannot find package "github.com/google/seesaw/quagga" in any of:
        /usr/local/go/src/github.com/google/seesaw/quagga (from $GOROOT)
        /root/go/src/github.com/google/seesaw/quagga (from $GOPATH)
common/seesaw/seesaw.go:27:2: cannot find package "github.com/google/seesaw/ipvs" in any of:
        /usr/local/go/src/github.com/google/seesaw/ipvs (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ipvs (from $GOPATH)
engine/core.go:36:2: cannot find package "github.com/google/seesaw/ncc/client" in any of:
        /usr/local/go/src/github.com/google/seesaw/ncc/client (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ncc/client (from $GOPATH)
engine/core.go:37:2: cannot find package "github.com/google/seesaw/ncc/types" in any of:
        /usr/local/go/src/github.com/google/seesaw/ncc/types (from $GOROOT)
        /root/go/src/github.com/google/seesaw/ncc/types (from $GOPATH)
engine/config/config.go:32:2: cannot find package "github.com/google/seesaw/pb/config" in any of:
        /usr/local/go/src/github.com/google/seesaw/pb/config (from $GOROOT)
        /root/go/src/github.com/google/seesaw/pb/config (from $GOPATH)
ipvs/ipvs.go:27:2: cannot find package "github.com/google/seesaw/netlink" in any of:
        /usr/local/go/src/github.com/google/seesaw/netlink (from $GOROOT)
        /root/go/src/github.com/google/seesaw/netlink (from $GOPATH)
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
root@node1:/home/balancer/seesaw# go env output

root@node1:/home/balancer/seesaw# go get -u github.com/miekg/dns
import cycle not allowed
package github.com/miekg/dns
        imports bufio
        imports bytes
        imports errors
        imports runtime
        imports internal/bytealg
        imports internal/cpu
        imports runtime

Я надеюсь, что вы можете помочь мне с этой проблемой

на основе github, файл, который дал первую ошибку, имеет следующий импорт:

import (
        "flag"
        "fmt"
        "os"
        "os/signal"
        "os/user"
        "strings"
        "syscall"
        "time"

        "github.com/google/seesaw/cli"
        "github.com/google/seesaw/common/conn"
        "github.com/google/seesaw/common/ipc"
        "github.com/google/seesaw/common/seesaw"

        "golang.org/x/crypto/ssh/terminal"
)

--- обновление 05/10/2018

после загрузки перейти на 1.6.2

balancer@node1:~$ sudo rm -rf /usr/local/go
balancer@node1:~$ sudo mv  go /usr/local
balancer@node1:~$ vi ~/.bashrc
balancer@node1:~$ source ~/.bashrc
balancer@node1:~$ go env
warning: GOPATH set to GOROOT (/home/balancer/go) has no effect
go: cannot find GOROOT directory: /home/balancer/go
balancer@node1:~$ vi ~/.bashrc
balancer@node1:~$ source ~/.bashrc
balancer@node1:~$ go env
GOARCH="amd64"
GOBIN="/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/balancer/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
balancer@node1:~$ cd seesaw/
balancer@node1:~/seesaw$ go get -u golang.org/x/crypto/ssh
go get -u github.com/golang/glog
go get -u github.com/miekg/dns
go get -u github.com/kylelemons/godebug/pretty
go get -u "github.com/google/seesaw/cli"
go get -u "github.com/google/seesaw/common/conn"
go get -u "github.com/google/seesaw/common/ipc"
 go get -u "github.com/google/seesaw/common/seesaw"
    go get -u "golang.org/x/sys/unix"
    go get -u "github.com/google/seesaw/common/server"
    go get -u "github.com/google/seesaw/ecu"
    go get -u "github.com/google/seesaw/engine"
    go get -u "github.com/google/seesaw/engine/config"
    go get -u "github.com/google/seesaw/ha"
    go get -u "github.com/google/seesaw/healthcheck"
    go get -u "github.com/google/seesaw/ncc"
    go get -u "github.com/google/seesaw/watchdog"
    go get -u "github.com/google/seesaw/quagga"
    go get -u "github.com/google/seesaw/ipvs"
    go get -u "github.com/google/seesaw/ncc/client"
    go get -u "github.com/google/seesaw/ncc/types"
    go get -u "github.com/golang/protobuf/proto"
    go get -u "github.com/google/seesaw/pb/config"
    go get -u "github.com/google/seesaw/netlink"

package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)
balancer@node1:~/seesaw$ go get -u github.com/dlintw/goconf
balancer@node1:~/seesaw$ go get -u github.com/golang/glog
balancer@node1:~/seesaw$ go get -u github.com/miekg/dns
package context: unrecognized import path "context" (import path does not begin with hostname)
balancer@node1:~/seesaw$ go get -u github.com/kylelemons/godebug/pretty
balancer@node1:~/seesaw$ go get -u "github.com/google/seesaw/cli"
balancer@node1:~/seesaw$ go get -u "github.com/google/seesaw/common/conn"
balancer@node1:~/seesaw$ go get -u "github.com/google/seesaw/common/ipc"
balancer@node1:~/seesaw$  go get -u "github.com/google/seesaw/common/seesaw"
balancer@node1:~/seesaw$     go get -u "golang.org/x/sys/unix"
# golang.org/x/sys/unix
../go/src/golang.org/x/sys/unix/ioctl.go:18: undefined: runtime.KeepAlive
../go/src/golang.org/x/sys/unix/ioctl.go:28: undefined: runtime.KeepAlive
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/common/server"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ecu"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/engine"
package context: unrecognized import path "context" (import path does not begin with hostname)
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/engine/config"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ha"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/healthcheck"
package context: unrecognized import path "context" (import path does not begin with hostname)
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ncc"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/watchdog"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/quagga"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ipvs"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ncc/client"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/ncc/types"
balancer@node1:~/seesaw$     go get -u "github.com/golang/protobuf/proto"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/pb/config"
balancer@node1:~/seesaw$     go get -u "github.com/google/seesaw/netlink"
balancer@node1:~/seesaw$
balancer@node1:~/seesaw$
balancer@node1:~/seesaw$ make test
go build ./...
../go/src/github.com/miekg/dns/client.go:7:2: cannot find package "context" in any of:
        /home/balancer/go/src/github.com/miekg/dns/vendor/context (vendor tree)
        /usr/local/go/src/context (from $GOROOT)
        /home/balancer/go/src/context (from $GOPATH)
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
balancer@node1:~/seesaw$ vi ../go/src/github.com/miekg/dns/client.go
balancer@node1:~/seesaw$ make test
go build ./...
../go/src/github.com/miekg/dns/scanner.go:7:2: cannot find package "context" in any of:
        /home/balancer/go/src/github.com/miekg/dns/vendor/context (vendor tree)
        /usr/local/go/src/context (from $GOROOT)
        /home/balancer/go/src/context (from $GOPATH)
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
balancer@node1:~/seesaw$ vi ../go/src/github.com/miekg/dns/scanner.go
balancer@node1:~/seesaw$ make test
go build ./...
../go/src/github.com/miekg/dns/server.go:7:2: cannot find package "context" in any of:
        /home/balancer/go/src/github.com/miekg/dns/vendor/context (vendor tree)
        /usr/local/go/src/context (from $GOROOT)
        /home/balancer/go/src/context (from $GOPATH)
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
balancer@node1:~/seesaw$ vi ../go/src/github.com/miekg/dns/server.go
balancer@node1:~/seesaw$ make test
go build ./...
# golang.org/x/sys/unix
../go/src/golang.org/x/sys/unix/ioctl.go:18: undefined: runtime.KeepAlive
../go/src/golang.org/x/sys/unix/ioctl.go:28: undefined: runtime.KeepAlive
# github.com/miekg/dns
../go/src/github.com/miekg/dns/client.go:222: req.WithContext undefined (type *http.Request has no field or method WithContext)
../go/src/github.com/miekg/dns/client.go:570: undefined: time.Until
../go/src/github.com/miekg/dns/msg_helpers.go:145: base32.HexEncoding.WithPadding undefined (type *base32.Encoding has no field or method WithPadding)
../go/src/github.com/miekg/dns/msg_helpers.go:145: undefined: base32.NoPadding
../go/src/github.com/miekg/dns/msg_helpers.go:271: undefined: strings.Builder
../go/src/github.com/miekg/dns/serve_mux.go:43: undefined: strings.Builder
Makefile:2: recipe for  target 'all' failed

С уважением,

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...