I recently jailbroke my Apple TV in order to run a web server on it using iOS-WebStack. I’m not sure if there was a mistake in the dependencies or because I was using the latest 5.2 firmware, but I also had to manually install the following package to get it to work:
apt-get install pcre