This is the way I did it, and hopefully should work for you as well.
Open terminal and login as root [or if you'd prefer, use sudo in every step.]
Code:
# cd /usr/src
# wget ‘http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2′
# tar xvfj linux-2.6.31.tar.bz2
After it’s extracted remove the previous symlink.
Code:
# rm -rf linux
# ln -s /usr/src/linux-2.6.31 /usr/src/linux
...