我在这里遇到了一个问题,尝试在 SuSE 机器上安装 libopenssl-devel。安装完全通过 DVD 进行(不涉及在线更新)。
$ sudo zypper install libopenssl-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides libopenssl0_9_8 = 0.9.8h needed by libopenssl-devel-0.9.8h-30.11.x86_64
Solution 1: do not install libopenssl-devel-0.9.8h-30.11.x86_64
Solution 2: break libopenssl-devel-0.9.8h-30.11.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c):
交互地,我会选择选项 2(忽略依赖项),因为安装的 libopenssl 版本是 0.9.8j,并且差异对于我的目的来说并不重要。(不,真的,它并不重要。)
问题是我想从脚本(Vagrant 提供程序脚本)中运行安装,所以......
我如何以非交互方式告诉 zypper 忽略依赖关系?
答案1
zypper -n install --force package
-n
=非交互式
--force
强制安装包