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.

    评论

报告相同问题?

悬赏问题

  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题