State Education Commissioner William L. Librera is leaving his post to work at Rutgers University. Librera, 59, is a longtime educator. Before he was appointed to run the education department by Gov. James E. McGreevey in 2002, he had stints as superintendent at four school districts in the state. He also has been a principal and social studies teacher. While his predecessors on the job resisted or denounced a series of state Supreme Court rulings saying the state had to do more for poor school districts, Librera embraced the rulings. Librera is leaving effective Sept. 7, a few months before he may have been replaced anyway. The winner of November's gubernatorial election will be able to pick cabinet members for a new administration. Librera said in a written statement that he always expected to serve out his term, but decided to leave early for "this extraordinary opportunity at Rutgers.'' He said he is taking a post in the state university's Graduate School of Education in a job that will build links between Rutgers and public schools.