Both Austria and France had substantial territorial interests which would be affected by a united Italy. Additionally, the balance of power which had long existed in Europe might be threatened by Italian unification. Lombardy and Venitia were both parts of Austria, and Naples and Sicily were ruled by a branch of the French Bourbon family. Since Austria controlled most of Northern Italy, it strongly opposed unification; in fact at the Vienna Conference, Count Metternich had said that the word Italy was "nothing but a geographic expression." Napoleon III was not interested in having a strong Italy at his back door; plus a number of French Catholics were outraged that he had supported Count Camillo de Cavour who was considered the enemy of the Pope. Cavour's actions resulted in strong nationalist feelings in Italy which concerned both Austria and France. Prussian victories over Austria and later France in the Seven Weeks War and the Franco Prussian War led to the expansion of the Kingdom of Italy into Venice and Rome.
The main reason for this is that Austria owned parts of the territory that is now Italy. Because of this, they did not want Italy to unify as that would have deprived them of their territory.
For example, the Austrians were in possession of two major parts of Italy. These were the provinces of Lombardy and Venetia , both in the northern part of what is now Italy. From these provinces, Austria was able to dominate politics in the whole peninsula.
By the time Italy was starting to truly unify, France was also afraid of a strong Italy. It did not want a unified country that would be a major danger to it. A disunited and weakened Italy was much more to France's liking.
So, France and Austria opposed a strong and united Italy because it would potentially be a danger to France and because it would take territory from Austria
tank you everyone for your answers. they were usefull