把老师提供的vendor文件夹放到fabric下面执行go build报下面这些错
来源:7-15 案例实战外部服务E

xixixi3432
2019-01-14
…/…/vendor/golang.org/x/sys/unix/env_unset.go:11:6: Unsetenv redeclared in this block
previous declaration at …/…/vendor/golang.org/x/sys/unix/env_unix.go:29:27
…/…/vendor/golang.org/x/sys/unix/flock.go:15:5: fcntl64Syscall redeclared in this block
previous declaration at …/…/vendor/golang.org/x/sys/unix/fcntl.go:13:5
…/…/vendor/golang.org/x/sys/unix/flock.go:18:6: FcntlFlock redeclared in this block
previous declaration at …/…/vendor/golang.org/x/sys/unix/fcntl.go:26:51
…/…/vendor/google.golang.org/grpc/credentials/go18.go:40:6: cloneTLSConfig redeclared in this block
previous declaration at …/…/vendor/google.golang.org/grpc/credentials/credentials_util_go18.go:47:39
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:30:6: Feedback redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:170:6
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:33:2: LevelTrace redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:21:25
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:34:2: LevelDebug redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:22:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:35:2: LevelInfo redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:23:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:36:2: LevelWarn redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:24:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:37:2: LevelError redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:25:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:38:2: LevelCritical redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:26:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:39:2: LevelFatal redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/notepad.go:27:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:45:2: TRACE redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/default_notepad.go:16:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:46:2: DEBUG redeclared in this block
previous declaration at …/…/vendor/github.com/spf13/jwalterweatherman/default_notepad.go:17:2
…/…/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go:46:2: too many errors
…/…/vendor/github.com/pelletier/go-toml/match.go:15:10: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:16:9: invalid argument castNode (type interface {}) for len
…/…/vendor/github.com/pelletier/go-toml/match.go:17:31: invalid operation: castNode[0] (type interface {} does not support indexing)
…/…/vendor/github.com/pelletier/go-toml/match.go:49:8: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:50:41: castNode.position undefined (type interface {} is interface with no methods)
…/…/vendor/github.com/pelletier/go-toml/match.go:70:27: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:77:31: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:143:24: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:177:24: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/query.go:98:31: undefined: TomlTree
…/…/vendor/github.com/pelletier/go-toml/match.go:177:24: too many errors
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:25:6: NewDefaultSecurityLevel redeclared in this block
previous declaration at …/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/impl.go:41:65
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:36:6: NewDefaultSecurityLevelWithKeystore redeclared in this block
previous declaration at …/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/impl.go:52:81
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:50:21: not enough arguments in call to New
have (bccsp.KeyStore)
want (int, string, bccsp.KeyStore)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:59:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:62:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:65:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:66:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:69:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:70:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:71:9: swbccsp.AddWrapper undefined (type bccsp.BCCSP has no fieldor method AddWrapper)
…/…/vendor/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw/new.go:71:9: too many errors
1回答
-
自游蜗牛
2019-01-14
亲,你好。这是go语言的包管理的问题,有些是版本不一样导致的,不能直接copy,你可以好好撸一下,基本上都是重复定义的问题。我也没法直接帮你,咱们的go语言环境配置是不一样的。祝你学习愉快!
00
相似问题