Environmental influence on the mechanical strength of chemical bonds in solids-ab initio quantum calculations