Problems with Magento’s PEAR

Trying to install some extensions today on a Magento installation I experienced the following error using Magento Connect:

pear/Console_Getopt requires PEAR Installer (version >= 1.9.1), installed version is 1.7.1

If you experience errors similar errors while using Magento Connect or Magento’s ./pear script try upgrading your PEAR installation using PEAR. Login in via SSH to the server running your Magento installation. Change your working-directory  to the root of the Magento installation and run the following two commands:

./pear channel-update
./pear upgrade --force PEAR

Doing that should upgrade your PEAR installation to the latest version. After that you should be able to install extensions using Magento connect as always.