Thank you for your help. I was able to find the problem with your help
and fix it.
The problem was not in libguestfs or its Ubuntu package.
Something was messed up in my system. dpkg-query didn't return anything
for a lot of packages.
I was able to fix this problem with apt install --reinstall for all
these packages.
Thanks again for your help. libguestfs is running now.