1)Go to System->Administration->Synaptic Package manager or Applications->Ubuntu Software center
2)Search for memcache and install php5-memcache
If memcache is not appearing in search results then go to settings in synaptic, then open reciprocities and check universe, restricted, and multiverse packages and click close.Then reload the packages in synaptic package manager.It should be available now.