当前位置 博文首页 > yunweigo的博客:问题:golang - unrecognized relocation (0x

    yunweigo的博客:问题:golang - unrecognized relocation (0x

    作者:[db:作者] 时间:2021-07-15 12:41

    go build 
    

    出现如下报错信息

    /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
    /usr/bin/ld: /tmp/go-link-848312084/000010.o: unrecognized relocation (0x2a) in section `.text'
    /usr/bin/ld: final link failed: 错误的值
    collect2: 错误:ld 返回 1
    

    处理方案

    rm -rf ~/.cache/go-build/*  # 删除历史构建信息
    yum install binutils    # 安装binutils软件
    
    cs
    下一篇:没有了