MDLog:/sysadmin

The Journal Of A Linux Sysadmin

Installing Pear Beta Packages

| Comments

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:

1
2
3
4
5
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

1
2
3
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:

1
pear -d preferred_state=beta install Translation2

Method 2: Shortcut… add -beta at the end of the install command

1
pear install Translation2-beta

Method 3: Force the installation with -f

1
pear install -f Translation2

Comments