Puppet Error – Could not file class in namespace – [solved]

How to Solve the Puppet Error: Could not find class in namespace#

Sometimes, when working with Puppet, you may encounter an error message that does not accurately reflect the actual problem. For example, if you see this error:

err: Could not retrieve catalogue: Could not find class php in namespaces standardbuild at /etc/puppet/manifests/templates.pp:15 on domain.internal.com

One of the possible causes could be a missing curly bracket in your code. This can be hard to spot and can waste a lot of your time. To avoid this, make sure you check your syntax carefully and use a code editor that can highlight any errors for you.

ERROR: phpize failed [solved]

How to install PHP development files

If you want to run phpize on your system, you need to install the development files of PHP first. Otherwise, you might get an error message like this:

sh: phpize: not found
ERROR: `phpize' failed

To install the PHP development files on Ubuntu/Debian, you can use the following command in the terminal:

apt-get install php5-dev

That should solve the problem. 🙂