  It was shown in \cite{GXY18} that the length $n$ of a $q$-ary linear locally
recoverable code with distance $d\ge 5$ is upper bounded by $O(dq^3)$. Thus, it
is a challenging problem to construct $q$-ary locally recoverable codes with
distance $d\ge 5$ and length approaching the upper bound. The paper
\cite{GXY18} also gave an algorithmic construction of $q$-ary locally
recoverable codes with locality $r$ and length $n=\Omega_r(q^2)$ for $d=5$ and
$6$, where $\Omega_r$ means that the implicit constant depends on locality $r$.
In the present paper, we present an explicit construction of $q$-ary locally
recoverable codes of distance $d= 5$ and $6$ via binary constant weight codes.
It turns out that (i) our construction is simpler and more explicit; and (ii)
lengths of our codes are larger than those given in \cite{GXY18}.
