I had this on Ubuntu 10.04 installing the Mongo PHP-extension. Did some research and tried this:
# pear search http The value of config option cache_dir (/tmp/pear/cache) is not a directory and attempts to create the directory failed.
When I created the directories by hand:
mkdir -p /tmp/pear/cachethe error "went away" and I was able to install: "pecl install mongo".