The second amendment does not prohibit licensing. You really need to start reading the Constitution as it was written, not the one your unicorn-infested mind keeps coming up with.
Shall Not Be Infringed already means No Licensing.
Here's how it works.
The Founding Dads placed the Bill of Rights in the hands of God for good and just reason.
They Intended, by vesting those Unalienable Rights in the Almighty, to place them so Far Above ANY human being's reach as to make it impossible to Infringe on them.
in·fringe
inˈfrinj/
verb
verb: infringe; 3rd person present: infringes; past tense: infringed; past participle: infringed; gerund or present participle: infringing
actively break the terms of (a law, agreement, etc.).
"making an unauthorized copy would infringe copyright"
synonyms: contravene, violate, transgress, break, breach; More
disobey, defy, flout, fly in the face of;
disregard, ignore, neglect;
go beyond, overstep, exceed;
infract
"the statute infringed constitutionally guaranteed rights"
antonyms: obey, comply with
act so as to limit or undermine (something); encroach on.
"his legal rights were being infringed"
synonyms: restrict, limit, curb, check, encroach on; More
As for driver's licenses, that won't wash.
The Constitution charges the Postal Service with creating and maintaining Post Roads to deliver the mail.
Because No One Person could afford to build the roads themselves.
Therefore, the Govt. does have the authority to License users because the Govt must own the roads, not the Individual.