I see the same errors on other systems now as well. When I created this in April it was working well, but as you can see in other posts in this thread, the Ubuntu image has been changing and becomes unfit for installing ERPNext without a great deal of work (which also seems to change every week as well).
To that end, I have stopped using Ubuntu as my OS and started using Debian 10 because it tends to be a bit more stripped down and less stuff that you don’t need built into it. Here is my steps for getting Debian 10 running:
However…
If you insist on using Ubuntu, there is one other method you can try. I used these step for a while before I turned away from Ubuntu. You might find this to be working better: