我需要使用需要选择解决方案的 zypper 自动安装包。如何在非交互模式下完成?
# zypper in /tmp/repos-sles15-sp2-current.x86_64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides sles-release = 15.2 needed by repos-sles15-sp2-x86_64-20210609-1.x86_64
Solution 1: do not install repos-sles15-sp2-x86_64-20210609-1.x86_64
Solution 2: break repos-sles15-sp2-x86_64-20210609-1.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c/d/?] (c): c
我需要选择选项#2。我试过的:
- 回声 2 | /tmp/repos-sles15-sp2-current.x86_64.rpm 中的 zypper
- 是 2 | /tmp/repos-sles15-sp2-current.x86_64.rpm 中的 zypper
- zypper 在 /tmp/repos-sles15-sp2-current.x86_64.rpm --force -y
有谁知道有助于选择选项#2的技巧?