On a SLES 12 virtual machine the command rpm -qa
does not return anything to stdout.
~> rpm -qa
~>
The command finishes after 1 or 2 seconds, so it clearly generates some data. Only when the output is redirected to a file or through a pipe it becomes visible:
~> rpm -qa > out.txt # works fine
~> rpm -qa | grep lib
libgcc ...
...
The problem is not with the rpm DB, the DB files in /var/lib/rpm/
are existing and seem healthy, a rebuild as suggested here does not solve the problem.