  We prove well-posedness for very general linear wave- and diffusion equations
on compact or non-compact metric graphs allowing various different conditions
in the vertices. More precisely, using the theory of strongly continuous
operator semigroups we show that a large class of (not necessarily
self-adjoint) second order differential operators with general (possibly
non-local) boundary conditions generate cosine families, hence also analytic
semigroups, on
${\mathrm{L}}^p({\mathbb{R}_+},{\mathbb{C}}^{\ell})\times{\mathrm{L}}^p([0,1],{\mathbb{C}}^m)$
for $1\le p<+\infty$.
