Open admininfon opened 1 year ago
https://haydenjames.io/fix-error-failed-to-download-metadata-for-repo-appstream-centos-8/
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
ln -s /usr/local/qconf/lib/libqconf.so /usr/lib64/libqconf.so
未找到libqconf.so
解决方案go env -w GOPROXY=https://goproxy.cn,direct
解决方案go build -o main-cli -ldflags "-L qconf -L m -s -w" .
添加cgo编译参数解决COPY --from=build $DIST_DIR/bin $RPC_DIR/bin
压缩进新镜像减小体积
Error:
获取Qconf配置加载到
viper
组件内.File:
hawk-rpc-go/config/qconf/index.go
与driver/go/src/infra/go_qconf/go_qconf.go
内容一致, 拷贝过来.请查找下问题, 为啥忽略呢?
找到问题:
cgo
编译参数, 文件go_qconf.go
import "C" 部分有注释说明, 添加-L qconf -L m
参数下面有追加镜像编译打包汇总.