The locally repairable code (LRC) studied in this paper is an
linear code of which the value at each coordinate can be recovered by a linear combination of at most
other coordinates. The central problem in this paper is to determine the largest possible minimum distance for LRCs. First, an integer programming-based upper bound is derived for any LRC. Then, by solving the programming problem under certain conditions, an explicit upper bound is obtained for LRCs with parameters
, where
and
. Finally, an explicit construction for LRCs attaining this upper bound is presented over the finite field
, where
. Based on these results, the largest possible minimum distance for all LRCs with
has been definitely determined, which is of great significance in practical use.