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软件
Logo

更多推荐