go-ethereum包下的secp256k1报错:undefined: secp256k1.Sign
分析:secp256k1包为混合编程包
查看环境 go env
没有安装gcc时是这样的
GOGCCFLAGS='-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3546983231=/tmp/go-build -gno-record-gcc-switches'
安装后是这样的
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build704633996=/tmp/go-build -gno-record-gcc-switches'
处理方法:安装gcc