The solution to the refugee crisis that is rocking the world is perhaps, glaringly simple. If people can have a safe and reasonable life in their homelands they are not going to risk the lives of their families in leaking boats in search of a future. They are not going to line up in thousands at the Mexico/USA border either.
It would be wise for the EU to make sure that Libya has a proper government, with or without any permission. Military force would be an option. Syria is a much more difficult problem because of the involvement of Putin and the Russians. Military action there is simply not a realistic possibility.
The thousands of refugees at the Mexican/USA border are predominantly from small central American countries where drug gangs simply run amok. It would be cheaper in the long run and more reasonable for the US to use force to clean up these small countries, with or without their cooperation, than to pursue the Trump Administration’s crazy anti-immigrant policies.
The only long-term solution to the refugee crisis is to clean up and rebuild the countries from where the refugees are fleeing!