了解 rpm 命令(-ivh 与 -uvh)

了解 rpm 命令(-ivh 与 -uvh)

只是想知道rpm -ivh <packagename>与有何不同rpm -uvh <packagename>

答案1

从手册页:

   The general form of an rpm install command is

   rpm {-i|--install} [install-options] PACKAGE_FILE ...

   This installs a new package.

   The general form of an rpm upgrade command is

   rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...

   This  upgrades  or  installs the package currently installed to a newer
   version.  This is the same as install, except all other  version(s)  of
   the package are removed after the new package is installed.

答案2

  • RPM 始终在任何操作之前检查依赖关系,除非您指示它不要这样做,例如使用--force或 之类的标志--nodeps

  • -u调用,有一个大写的-U

  • -i指示 RPM 安装系统上尚未安装的软件包,如果已经安装了同名软件包,则会失败

  • -U指示 RPM 更新系统上已安装的软件包,如果尚未安装同名且版本较低的软件包,则会失败。

与.--nodeps​​--forcedpkg

相关内容