前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【rancher】rancher编译-2

【rancher】rancher编译-2

作者头像
runzhliu
发布2021-12-02 21:05:08
8190
发布2021-12-02 21:05:08
举报
文章被收录于专栏:容器计算容器计算

rancher的编译-2

接上一篇,rancher的编译-1,因为整个 rancher 是有 Makefile 的,所以正常来说一个 make 命令也可以让你进行编译。

执行一下 make 然后报错了。

代码语言:javascript
复制
Step 12/43 : RUN zypper -n install gcc binutils glibc-devel-static ca-certificates git-core wget curl unzip tar vim less file xz gzip sed gawk iproute2 iptables jq
 ---> Running in 748aca0d5ac9
crypto/fips/fips.c:524: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
The command '/bin/sh -c zypper -n install gcc binutils glibc-devel-static ca-certificates git-core wget curl unzip tar vim less file xz gzip sed gawk iproute2 iptables jq' returned a non-zero code: 139
FATA[0260] exit status 139

https://access.redhat.com/discussions/5890451

另一个问题,很明显是 helm 仓库的问题…大概是国外的仓库,国内搞不定,那就换个源好了。

代码语言:javascript
复制
Step 21/42 : RUN curl -sLf ${!HELM_URL_V2} > /usr/bin/rancher-helm &&     curl -sLf ${!TILLER_URL} > /usr/bin/rancher-tiller &&     chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller &&     ln -s /usr/bin/rancher-helm /usr/bin/helm &&     ln -s /usr/bin/rancher-tiller /usr/bin/tiller &&     helm init -c &&     helm plugin install https://github.com/rancher/helm-unittest
 ---> Running in 3a850541282f
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Error: error initializing: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden
The command '/bin/sh -c curl -sLf ${!HELM_URL_V2} > /usr/bin/rancher-helm &&     curl -sLf ${!TILLER_URL} > /usr/bin/rancher-tiller &&     chmod +x /usr/bin/rancher-helm /usr/bin/rancher-tiller &&     ln -s /usr/bin/rancher-helm /usr/bin/helm &&     ln -s /usr/bin/rancher-tiller /usr/bin/tiller &&     helm init -c &&     helm plugin install https://github.com/rancher/helm-unittest' returned a non-zero code: 1
FATA[0042] exit status 1
make: *** [ci] Error 1

最后从 stack overflow, 找到比较简单的解决方法。

如果这个仓库不行的话,建议使用 aliyun 的仓库

在这里插入图片描述
在这里插入图片描述

make 一下,还是报错。

在这里插入图片描述
在这里插入图片描述

这个看起来是编译脚本的问题,全局搜一下这个错误信息,可以发现是在 ./scripts/validate 这个脚本内,查了一下,暂时注释掉应该问题不大,因为这里的意思是防止你的 git 仓库有改动没提交就开始编译了,挺麻烦的,但是可以暂时不管。如果平时是修改 rancher 源码再发布的话,走这个流程是相当麻烦的,建议直接 go build

如果不想做单测的话,可以注释了这一行。

在这里插入图片描述
在这里插入图片描述
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-11-01 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • rancher的编译-2
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档