It is understandable on why you are not able to install the packages by changing your VM type (you are confined to free tier usage).
However, as these are the dependency packages that are needed, can you try to install from the source code and see if that helps.
Please check this.
Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.
Thanks Mate.
Your suggestion was good. I thought I had clicked "Accept" but had not.
Accepted now