As I have asked a wrong question previously, I edited a bit.
It is obvious that the cokernel construction does not work well for the category of Lie algebras. The cokernel exists only for a normal inclusion $\mathfrak{h}\hookrightarrow \mathfrak{g}$.
It is said that 2-categories(=bicategories) have a weak notion of limits/colimits. In some cases, even if a category $C$ does not have limits, but there may exist a way to view/extend, what ever, $C$ as a 2-category in which the limits work well.
Therefore, I am wondering
(1) Whether there is such a 2-categories for Lie algebras in which 2-categorical cokernels work well. I know there is a notion of Lie 2-algebras(and $L_\infty$-algebras), but I do not know whether the cokernel of a Lie algebra morphism, other than normal inclusions, viewed as a Lie 2-algebra morphisms exists.
(2) Whether there is a universal way to fix a cokernel(or other limits/colimits) ill-behaved category, obtaining a category(maybe 2-category)?
Thanks to commenters, I realized that the naive statement on Lie algebras is simply wrong. My original attempt is to consider the cokernel for $L_\infty$-algebra morphisms. My second question still make sense.