If you are trying to install YAML via PECL on Lion, you may get an error such as the following.
configure: error: Please install libyaml ERROR: `/private/tmp/pear/install/yaml/configure --with-yaml' failed
Some solutions on the internet suggest installing it via a package manager.
rvm pkg install libyaml
However, although this process will claim to work, when you come to run the command again, it will fail at the same point. Instead, you need to download libyaml, which you can do here, then extract it, cd into the directory and run the following commands.
./configure make make install
You don’t need to sudo. You should now be able to run the install command again.
sudo pecl install --ignore-errors yaml
This time it should be successful.