yum使用
1. Rpmdb checksum is invalid: dCDPT(pkg checksums)
问题: yum install
的时候报错 Rpmdb checksum is invalid: dCDPT(pkg checksums)
原因:rpm数据库损坏需要重建
解决:rpm –rebuilddb ; yum install -y sudo …
代码片段:
RUN rm -rf /var/lib/yum/history/*.sqlite && rpm --rebuilddb && yum install -y git openssh-client && yum clean all && mkdir -p /opt/ko && history -c
2. Warning: RPMDB altered outside of yum.
问题: yum install 过程中警告 Warning: RPMDB altered outside of yum.
原因: yum 历史记录数据库损坏
解决:rm -rf /var/lib/yum/history/*.sqlite
代码片段:
RUN rm -rf /var/lib/yum/history/*.sqlite && rpm --rebuilddb && yum install -y git openssh-client && yum clean all && mkdir -p /opt/ko && history -c