在自动安装中在bash脚本中发出命令“zypper build-install”

时间:2016-01-20 04:02:45

标签: bash shell sh suse

我有一个跟随命令,提示用户从[1/2 / c]中选择一个选项,是否有人知道如何为bash脚本自动执行此过程,以便它不会提示并获得“1”选项完成安装。

    $zypper source-install  R-patched
    Reading installed packages...
    Loading repository data...
    Resolving package dependencies...

    Problem: nothing provides gcc43 = 4.3.4_20091019-0.7.35 needed by gcc43-fortran-4.3.4_20091019-0.7.35.s390x
    Solution 1: do not ask to install a solvable providing gcc-fortran
    Solution 2: break gcc43-fortran-4.3.4_20091019-0.7.35.s390x by ignoring some of its dependencies

    Choose from above solutions by number or cancel [1/2/c] (c): Cannot read input: bad stream or EOF.

1 个答案:

答案 0 :(得分:-1)

尝试做:

echo "1" | zypper source-install  R-patched