OpenSUSE install lsof package to get rid of 'zypper ps' errors

Originally published at:

I run the following command but getting error:</br/>
$ zypper ps</br/>
    Check failed:
    Please install package ‘lsof’ first.
How do I fix and how can I use the ‘zypper ps’ on OpenSUSE 15.1/15.2 to find out if system reboot requires or not?

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki