Reason #132409549039590903905690 why invading Libya was a mistake
No, the problem was that the US didn't actually put boots on the ground and put in the work to support any one faction. This is happening because there's chaos, because there's no real central authority, whether small-d democratic or otherwise.
Gaddafi was unacceptable, he was threatening to burn cities to the ground and drown everyone in blood. But the second civil war and the entire breakdown of authority could have also been avoided.