If you’re running a Linux server and attempt to use pecl
or pear
when having an older version of Drush installed, you may run into the following error.
$ pecl upgrade Error getting channel info from pear.drush.org: File http://pear.drush.org:80/rest/p/packages.xml not valid (received: HTTP/1.1 404 Not Found) pear.php.net is using a unsupported protocol - This should never happen. upgrade failed
This is annoying and is a direct result of the way Drush is now being distributed. Until recently, you could install Drush via PEAR packages. That method has been deprecated and replaced with new installation instructions.
But, if you still have Drush installed via Pear, you get the error above.
First, try to remove the old Drush channel from pear/pecl.
$ pecl channel-delete pear.drush.org Channel "pear.drush.org" has installed packages, cannot delete
Ah, bummer. Makes sense, because Drush was (and still is) installed via pear. To list all packages installed via that channel, use the following command:
$ pear list -c pear.drush.org Installed packages, channel pear.drush.org: =========================================== Package Version State drush 6.2.0.0 stable
In order to remove that Drush channel, remove the package first and replace it with the new Drush installation commands.
$ pear uninstall drush/drush uninstall ok: channel://pear.drush.org/drush-6.2.0.0
If you’re running RHEL or CentOS, chances are this was installed via yum
(which is in the EPEL repositories). Remove those packages in that case.
$ rpm -qa | grep drush php-channel-drush-1.3-2.el7.noarch php-drush-drush-6.2.0-3.el7.noarch $ yum remove php-drush-drush php-channel-drush
Now your pecl/pear configuration is “clean” again with no more broken channels.