There is one generalization of fibered links in 3-manifolds, called homologically fibered links. It is known that the existence of a homologically fibered link whose fiber surface has a given homeomorphic type is determined by the first homology group and its torsion linking form of the ambient 3-manifold. In this paper, we interpret the existence of homologically fibered links with that of a solution of some equation, in terms of the first homology group and its torsion linking form or a surgery diagram of the ambient manifold. As an application, we compute the invariant hc(⋅), defined through homologically fibered knots, for 3-manifolds whose torsion linking forms represent a generator of linkings.