Installing Pear Beta Packages
Here is a quick tip that will show several methods how you can install pear beta packages. Normally if you will try to install a pear package that has not released yet a stable version, you will receive an error like:
pear install Translation2
Failed to download pear/Translation2 within preferred state "stable", latest release is version 2.0.0RC3, stability "beta", use "channel://pear.php.net/Translation2-2.0.0RC3" to install
Cannot initialize 'channel://pear.php.net/Translation2', invalid or missing package file
Package "channel://pear.php.net/Translation2" is not valid
install failed
Method 1: The classic way - to set the preferred_state beta
pear config-set preferred_state beta
pear install Translation2
pear config-set preferred_state stable
or much simpler we can set the preferred_state within the same command:
pear -d preferred_state=beta install Translation2
Method 2: Shortcut… add -beta at the end of the install command
pear install Translation2-beta
Method 3: Force the installation with -f
pear install -f Translation2