drix47193 2018-09-01 11:17
浏览 411

运行dlv debug test.go时找不到二进制文件中的debug_line部分

Using macOS, installed dlv via brew install go-delve/delve/delve

then try to debug a program in test.go like this: dlv debug test.go

then got this error:

could not launch process: could not find __debug_line section in binary

Any suggestion?


updated on 9/4

I uninstalled the brew dlv and install like below, it still not work.

localhost:dlv lua$ go get github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ cd $GOPATH/src/github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ go build localhost:dlv lua$ go install localhost:dlv lua$ pwd /Users/lua/go/src/github.com/derekparker/delve/cmd/dlv localhost:dlv lua$ dlv -bash: /usr/local/bin/dlv: No such file or directory localhost:dlv lua$

  • 写回答

1条回答 默认 最新

  • du42561 2018-09-01 12:00
    关注

    You can install it from the source code instead of using brew.

    go get github.com/derekparker/delve/cmd/dlv
    cd $GOPATH/src/github.com/derekparker/delve/cmd/dlv
    go build 
    go install
    

    This should fix this issue.

    评论

报告相同问题?

悬赏问题

  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办