First download the source code from here, currently I am using the version 4.1.4, and 4.1.5 is broken for "install_sh" dependency.
Build sed with:
./configure --prefix=/opt/markc
make
sudo make install
Then sed is ready to use, but make sure the path /opt/markc/bin is in PATH environment.