gpt4 book ai didi

Linux : rpm -Uvh/rpms/* command not working as expected

转载 作者:太空宇宙 更新时间:2023-11-04 10:05:10 25 4
gpt4 key购买 nike

<分区>

我想在基于 Redhat/Linux 的系统中升级一些 rpm。有些 rpm 可能已经存在,有些 rpm 是新安装的,有些 rpm 需要使用 RPM 升级命令升级到更高版本。

例如:

 I have placed rpms to be installed in folder <rpms>
/rpms/X-1.rpm (This is already installed in system)
/rpms/Y-1.rpm (This is NOT present in system. This is NEW)
/rpms/Z-2.rpm (This is need to be upgraded to higher version available,
Z-1.rpm is installed in system)
/rpms/Q-1.rpm (This is already installed in system)

我在 shell (.sh) 文件中运行以下命令

$rpm -Uvh /rpms/*

执行后如下图

Preparing...            ################################### [100%]
package X-1 is already installed
package Q-1 is already installed

但它没有安装 Y-1,也无法升级到 Z-2。

请告诉我需要用 -Uvh 命令做什么才能让它工作?上述情况的最佳解决方案是什么?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com