您当前的位置: 首页 > 
  • 2浏览

    0关注

    212博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

././libsecp256k1/src/util.h:14:10: fatal error: stdlib.h: No such file or directory

杰哥的技术杂货铺 发布时间:2021-04-25 19:34:12 ,浏览量:2

1.问题说明

在Alpine容器中构建geth项目,报错如下:

# github.com/ethereum/go-ethereum/crypto/secp256k1
In file included from ././libsecp256k1/src/secp256k1.c:9,
                 from vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/secp256.go:26:
././libsecp256k1/src/util.h:14:10: fatal error: stdlib.h: No such file or directory
   14 | #include 
      |          ^~~~~~~~~~
compilation terminated.
2.问题原因

缺少gcc、g++环境

3.安装所需环境

Alpine容器中安装gcc、g++环境

  • 升级所有包及软件和系统内核
apk update
  • 安装gcc
# apk add gcc

# gcc --version
gcc (Alpine 10.2.1_pre1) 10.2.1 20201203
  • 安装g++
# apk add g++

# g++ --version
g++ (Alpine 10.2.1_pre1) 10.2.1 20201203
关注
打赏
1666063422
查看更多评论
立即登录/注册

微信扫码登录

0.0375s