doudu2591
2017-12-13 00:19
浏览 62
已采纳

外部链接crypto / rc4.a失败

I'm having issues compiling code that deep somewhere in itself it tries to link to go's crypto/rc4 but returns with the following linking error:

truncated object file: /usr/local/go/pkg/linux_amd64/crypto/rc4.a: EOF
crypto/rc4.NewCipher: call to external function
crypto/rc4.init: call to external function
crypto/tls.cipherRC4: relocation target crypto/rc4.NewCipher not defined
crypto/tls.cipherRC4: relocation target type.*crypto/rc4.Cipher not defined
crypto/tls.init: relocation target crypto/rc4.init not defined
crypto/tls.cipherRC4: undefined: "crypto/rc4.NewCipher"
crypto/tls.cipherRC4: undefined: "type.*crypto/rc4.Cipher"
crypto/tls.init: undefined: "crypto/rc4.init"

The following are my go variables:

GOPATH=/home/sfines/workspace/audit_system
GOROOT=/usr/local/go

My Go version is : go version go1.9.2 linux/amd64

I've made sure that there is only one version of Go installed. I'm at my wits end.

图片转代码服务由CSDN问答提供 功能建议

我在编译代码时遇到问题,该代码本身深处会尝试链接到crypto / rc4,但返回 以下链接错误:

 截断的目标文件:/usr/local/go/pkg/linux_amd64/crypto/rc4.a:EOF 
crypto / rc4.NewCipher:调用 外部函数
crypto / rc4.init:调用外部函数
crypto / tls.cipherRC4:重定位目标crypto / rc4.NewCipher未定义
crypto / tls.cipherRC4:重定位目标类型。* crypto / rc4.Cipher未定义
crypto  /tls.init:重定位目标crypto / rc4.init未定义
crypto / tls.cipherRC4:未定义:“ crypto / rc4.NewCipher” 
crypto / tls.cipherRC4:未定义:“ type。* crypto / rc4.Cipher” \  ncrypto / tls.init:未定义:“ crypto / rc4.init” 
   
 
 

以下是我的go变量:

   GOPATH = / home / sfines / workspace / audit_system 
GOROOT = / usr / local / go 
   
 
 

我的Go版本是: go 版本go1.9.2 linux / amd64

我有 确保仅安装一个版本的Go。 我无能为力。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanli3277 2017-12-13 00:56
    已采纳

    This is a badly-extracted Go install with missing or partial files. A fresh install (with no errors) fixes the issue.

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题