【rancher】rancher编译-2
2023-03-31 10:33:58 时间
rancher的编译-2
接上一篇,rancher的编译-1,因为整个 rancher 是有 Makefile 的,所以正常来说一个 make
命令也可以让你进行编译。
执行一下 make
然后报错了。
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 仓库的问题…大概是国外的仓库,国内搞不定,那就换个源好了。
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
。
如果不想做单测的话,可以注释了这一行。
相关文章
- Hello World 程序的起源与历史
- 非科班出身的人学习编程不负责任指南
- PHP 8.1新特性公布 增加 Enums、Fsync功能
- 什么时候应该避免注释代码?
- 现在写 PHP,你应该知道这些
- 居然还能这样——程序员加薪的新方法
- 程序员不要输在起跑线上 这4个问题帮你迅速入行
- 怎样提高开发效率?关于增效,需要做好这两点
- 新一轮互联网的泡沫将破灭,大量低级别的码农面临淘汰
- 坐着编程变胖 站着编程伤膝盖
- 不懂技术的人不要对懂技术的人说这很容易实现
- 如何在中国打造拥有谷歌工程师文化的团队
- 什么时候应该避免注释代码
- 教你如何在 Linux 中锁定和解锁多个用户
- 排序之简单选择排序
- 什么是Javascript Hoisting?
- 创业是一场游戏,会玩的人才会赢
- 以一当十的程序员不是传说
- 程序员如何既不耽误工作又有时间干业余项目?
- 掌握微服务下分布式锁的正确姿势