susezypper

How to install all dependencies in SUSE using "zypper " in a one line command?


zypper install glibc* libstdc*

The following 6 NEW packages are going to be installed: glibc-devel-32bit libstdc++-devel libstdc++-devel-32bit libstdc++48-devel libstdc++48-devel-32bit libstdc++6-locale

6 new packages to install. Overall download size: 4.7 MiB. Already cached: 0 B. After the operation, additional 33.1 MiB will be used. Continue? [y/n/? shows all options] (y):

I need to install all resolved dependencies in one command line for my automation script.Can anyone suggest ?

Eg: "yum install package1 package2 -y" usually installs all the packages and its dependencies on Rhel . Do we have anything similar in SUSE ?


Solution

  • you can use --non-interactive; as you can see in the man pages of zypper:

    -n, --non-interactive

    Switches to non-interactive mode. In this mode zypper doesn’t ask user to type answers to various prompts, but uses default answers automatically. Those default answers also depend on other options like --no-gpg-checks or --ignore-unknown.