In this paper, we address two boundary cases of the classical Kazdan–Warner problem. More precisely, we consider the problem of prescribing the Gaussian and boundary geodesic curvature on a disk of $\mathbb {R}^2$, and the scalar and mean curvature on a ball in higher dimensions, via a conformal change of the metric. We deal with the case of negative interior curvature and positive boundary curvature. Using a Ljapunov–Schmidt procedure, we obtain new existence results when the prescribed functions are close to constants.