donkey199024 2016-09-12 20:44
浏览 156
已采纳

如何修复delve“无法加载包:包内部”错误

So I installed VSCODE on my windows machine as my main golang IDE and I guess my overall lack of go knowledge is making me experience this seemingly unsolvable error: I installed delve and wanted to use it as my debugger in vscode-go. I did everything as mentioned in the readme on https://github.com/Microsoft/vscode-go , yet for some reason when I run dlv debug I get error "can't load package: package internal: no buildable Go source files in c:\go\src\internal exit status 1". I couldn't find anything related to this folder on the internet, but I have never myself entered the path to src/internal in any of the config files. So this is making me really confused, since I thought if it was a common folder someone should have atleast gotten the same error once.

It occurs both in the vscode and in command prompt, also if dlv test is run. I also know it is not the issue with my folder structure/env variables since it complains about my package files missing too if I remove them in addition to also giving the same c:\go\src\internal error. It seems as if there is a setting somewhere to check that folder for source files too, but I can't find the setting and the dlv debug crashes after giving me the error.

  • 写回答

4条回答 默认 最新

  • dongwuying0221 2016-09-13 09:03
    关注

    Got same issue with latest delve and vscode:

    can't load package: package internal: no buildable Go source files in C:\Coding\Go\src\internal

    and 'go build' working without any errors

    Have to fallback to previous version of delve to get it working. It seems delve broke something or just need to update some things. Seems it enough just to replace dlv.exe in %GOPATH%\bin folder. I'm not sharing my version because it exe, but you can find it or build from sources

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大