Sure it can be averted (In a timeline where a nuclear war over Cuba happens, the people there will say that it's inevitable. It is in fact not)!
The Moroccan crises were over. Persia, China and the Far East, etc. problems had been solved.
Every European country that went to war in OTL did so for they were "protecting" their status as a great power. For Example, Austria-Hungary wanted to prove itself after the Archduke was murdered. Without such a stupid casus belli, no war would have occured.
Germany and Austria-Hungary believed that in just a few years from 1914 Russia would surpass them in industrial and military power (and later on the USA. It was inevitable, for Russia had more resources and reformism was become more prevalent even after the setback during Alexander III's reign). If no war occurs by 1917, Germany and Austria-Hungary would be reluctant to go to war with Russia. Eventually they have to appease her.
"Russia is rapidly becoming so powerful that we must retain her friendship at almost any cost."
-George Buchanan, British Ambassador to Russia
I kind of remembered more quotes and the notion about expiring alliances, don't know which thread I got it.
With a possible solution to the Balkans problem, a peaceful 20th century will ensue.
I think everywhere tensions were solved.