dsxpt62448 2019-05-26 17:09
浏览 175

运行“ go get github.com/libp2p/go-libp2p”会导致错误消息

I'm a beginner with golang. When trying to run "go get github.com/libp2p/go-libp2p" I get an error message that prevents me from being able to run tests & benchmarks.

Here is the error:

github.com/libp2p/go-libp2p/p2p/host/routed

../../libp2p/go-libp2p/p2p/host/routed/routed.go:153:20: cannot use rh.host.Mux() (type "github.com/libp2p/go-libp2p-core/protocol".Switch) as type *multistream.MultistreamMuxer in return argument: need type assertion ../../libp2p/go-libp2p/p2p/host/routed/routed.go:190:5: cannot use (*RoutedHost)(nil) (type *RoutedHost) as type "github.com/libp2p/go-libp2p-core/host".Host in assignment: *RoutedHost does not implement "github.com/libp2p/go-libp2p-core/host".Host (wrong type for Mux method) have Mux() *multistream.MultistreamMuxer want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch

github.com/libp2p/go-libp2p/p2p/host/basic

../../libp2p/go-libp2p/p2p/host/basic/basic_host.go:145:32: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService: *BasicHost does not implement host.Host (wrong type for Mux method) have Mux() *multistream.MultistreamMuxer want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch ../../libp2p/go-libp2p/p2p/host/basic/basic_host.go:172:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService: *BasicHost does not implement host.Host (wrong type for Mux method) have Mux() *multistream.MultistreamMuxer want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch

I don't understand why the error messages. It looks like go-libp2p does not compile. any ideas?

  • 写回答

1条回答 默认 最新

  • dtu11716 2019-05-26 17:22
    关注

    They've been performing a refactor, which resulted in this issue being submitted.

    A solution was provided:

    enter image description here


    评论

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法