but got no results. Then I went to https://software.opensuse.org/ found pwgen but when I tried to install with one click install the installation failed saying pwgen failed to install.
Hi
I would surmise you being directed to an incomplete mirror…
It’s part of the distribution…
zypper if pwgen
Information for package pwgen:
------------------------------
Repository : openSUSE-Leap-15.0-Oss
Name : pwgen
Version : 2.08-lp150.1.3
....
Loading repository data...
Warning: Repository 'openSUSE-Leap-15.0-Update' appears to be outdated. Consider using a different mirror or server.
Reading installed packages...
package 'pwgen' not found.
Since pwgen is supposed to be in the oss repo,
I wonder if there is something amiss on your machine, it’s one thing for the package not found, it’s another thing not to even be able to find the package… and this is aside from your having a problem updating your oss-update repo.
One gotcha you might have is that prior to 15.1, you may have disabled your install source (which would also have been your original oss repo) but never enabled your online oss (you almost absolutely need this if you disable your original install source). With 15.1, this little maneuver is done automatically.
Recommend:
Post your repository list with URLs so your repos can be checked and verified. You should see minimally 4 enabled repos… oss, oss-update, non-oss, non-oss-update
zypper lr -d
Then forcibly try to refresh your repos, if any fail you should see a reason for the failure like a bad network connection, bad location, etc
zypper refresh
If the above succeed, then your problems likely resolved on their own and you should now be able to search for pwgen, the following is from the command line instead of using YaST (no difference which you choose)
zypper se pwgen
And, if your system can find a package, then you should be able to install it