51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

RockyLinux9安装rpm软件包报错

报错内容大致如下:

RPM: warning: Signature not supported. Hash algorithm SHA1 not available.
RPM: warning: Signature not supported. Hash algorithm SHA1 not available.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Transaction test error:

问题原因:

这是因为在RockyLinux9系列系统(理论适用于其它兼容红帽9的系统),默认的加密策略已禁用SHA1算法。

解决方案:

可以通过启用SHA1算法支持,允许系统使用SHA1签名的软件包。

启用SHA1支持
update-crypto-policies --set DEFAULT:SHA1

|---|-------------------------------------------| | 1 | update-crypto-policies --set DEFAULT:SHA1 |

恢复默认策略
update-crypto-policies --set DEFAULT

|---|--------------------------------------| | 1 | update-crypto-policies --set DEFAULT |

赞(3)
未经允许不得转载:工具盒子 » RockyLinux9安装rpm软件包报错