Why am I getting those pgfkeys errors?

This error message indicates that your version of pgfplots is older than 1.8 . According to your investigation, it is 1.5.1 .

That means you have two options:

  1. upgrade pgfplots. The current stable is 1.12.1 at the time of this writing.

  2. change your files to contain compat=1.5. This might result in slightly different outcome compared to your old results with compat=1.8 and pgfplots 1.8, but should typically be fine.

I suggest to upgrade pgfplots using your TeX package manager.