It is actually the curl stage, as it is what it fails when can't do an OPT DNS query type 41 hex (65 is the decimal conversion)).
No, my DNS server/resolver software doesn't support it. I should have told, but I got tired of test, renames, edits... oh dear...
I know the software is old, but trusted, but, also, there shouldn't be need to hardcode EDNS queries on curl. Too paranoid, in my opinion.
I tested with the "--force-ipv4" and it is the same.
If the curl update is really necessary... I'll have to change the software, but it is really dumb reason :/
It works if I redirect queries to an external resolver (example: 1.1.1.1)... but defeats the purpose of using a local one in first place
Do you know what is really curious? That I almost always perform formats queries first, and it does this without a problem (querying correctly an A record for www.youtube.com), but when queries it again (or direct download, without query formats first) for download... In other words, it happens at download time
In the version of curl I have I don't have such an EDNS option to test.