Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Discovery of channel "pear.drush.org" failed (channel-add: Cannot open "http://pear.drush.org/channel.xml" (File http://pear.drush.org:80/channel.xml not valid (received: HTTP/1.1 404 Not Found
)))
Error on 2 macs, remote ubuntu.
Related: #1215346: Distributing drush via PEAR (was drush debian packaging usage instructions
Comments
Comment #1
dwightaspinwall CreditAttribution: dwightaspinwall commentedI'm having same problem from ubuntu:
Which is odd, considering that I can curl that URI:
Comment #2
ccoppen CreditAttribution: ccoppen commentedGetting the same error on Ubuntu 10.04 Server, but succeeded on Ubuntu 11.10 Desktop.
Looking to see if there's a blocking issue, but wget works fine to grab the drush file from the project page.
I can navigate to the channel.xml in the browser just fine.
Comment #3
ccoppen CreditAttribution: ccoppen commentedUpdate:
I tested pear channel-discover with the following site: http://pear.symfony-project.com/ and it worked properly adding the channel. This was with the 10.04 server.
The issue must be with the pear.drush.org.
It worked from 11.10 desktop, but not with the 10.04 server.
Comment #4
ccoppen CreditAttribution: ccoppen commentedAhh....problem solved.
From another project that someone was having the same issue with, just do the following:
pear upgrade
Once that's done, do the pear channel-discover again.
It worked.
Comment #5
msonnabaum CreditAttribution: msonnabaum commentedYup, just need to upgrade your version of pear.
The actual pear channel is hosted on github, so its pretty unlikely it'll be down.
Comment #6
greg.1.anderson CreditAttribution: greg.1.anderson commentedI added a note about pear upgrade on the main project page.
Comment #7
mariomaric CreditAttribution: mariomaric commentedGreg, can you please maybe prefix all commands (on the main project page) with "sudo"?!
Most people probably use standard Ubuntu setup, in which pear commands will not work without sudo...
Comment #8
torpy CreditAttribution: torpy commentedShouldn't the command be [sudo] 'pear upgrade pear'?
'pear upgrade' didn't work for me on Ubuntu 8.04..
Comment #9
msonnabaum CreditAttribution: msonnabaum commentedNot going to add sudo.
Those who install php via homebrew (me) don't have to use sudo. If I did it would screw up my perms.
Comment #10
moshe weitzman CreditAttribution: moshe weitzman commentedWe could add a comment suggesting that folks use sudo if they get perm failures.
Comment #11
msonnabaum CreditAttribution: msonnabaum commentedNot apposed to that.
Comment #12
mariomaric CreditAttribution: mariomaric commented+1 for #10.
Comment #13
seanrThis is actually not working. Even after the upgrade it still doesn't work.
Even after following the instructions in that warning about protocols being updated, it still doesn't work. AFAICT, this is just 100% broken.
Comment #14
ccoppen CreditAttribution: ccoppen commentedHave you tried
sudo pear upgrade pear
as suggested in previous comments?
Comment #15
msonnabaum CreditAttribution: msonnabaum commentedHmm, given that I've never actually been able to make this *not* work, I wouldn't exactly describe it as 100% broken.
That said, 1.9.4 should be the version you need. The discovery seems to work fine for me on 1.9.4. Any more info you can provide?
Comment #16
seanrYou'll notice from my pasted code that I was already root. The first command was pear upgrade pear run as root and it didn't have any effect.
FWIW, I finally just gave up and did it the old fashioned way.
Comment #17
Steven Merrill CreditAttribution: Steven Merrill commentedI'm afraid I'm having the same problem under CentOS 5.6.
In adding some
print_r()
statements to my PEAR source files (even after doing asudo pear upgrade pear
), I see that it's sending a Host: header of "pear.drush.org:80", which is throwing GitHub Pages off and causing it to throw a 404.The entire request is as follows:
Comment #18
Steven Merrill CreditAttribution: Steven Merrill commentedSure enough, upgrading to PEAR 1.9.1 (by installing php52-pear from IUS in this specific case) fixed this issue for me, but there may be quite a few folks out there with ancient PEAR versions that still send a Host header with :80 appended.
(Yes, technically it's legal to include a port in the Host: header per the HTTP/1.0 spec, but this was also breaking Google Code last year: http://blog.pear.php.net/2010/03/23/google-code-channels-broken/.)
Since there may still be people out there (any CentOS 5.x users, to start with) who have ancient PEAR versions for whom a
sudo pear upgrade pear
won't really change anything, what's the best option?We could contact GitHub and see if they'll address it, or else we could run a proxy in front of pear.drush.org and strip out a trailing ":80" from the Host header. ;)
Comment #19
moskito CreditAttribution: moskito commentedWorkaorund for CentOS 5 users to upgrade PEAR (https://bugzilla.redhat.com/show_bug.cgi?id=673521#c4):
Comment #20
msonnabaum CreditAttribution: msonnabaum commentedSteve - Can you comment on the feasibility of the workaround above?
If that doesn't work I'll think a bit more about how we take care of I on our end.
Comment #21
Steven Merrill CreditAttribution: Steven Merrill commentedThat worked, and I'll try from a fresh VM - the upgrade-all at the end might not be necessary. Thanks!
I can write up a summary of CentOS options for the documentation.
Comment #22
mgiffordOn Debian I also needed to run
sudo pear upgrade-all
I think this should be changed on the initial project page. I tried
sudo pear upgrade
first, but that didn't work.Comment #23
xcafebabe CreditAttribution: xcafebabe commentedWorked for me @moskito solution. Thanks!
Comment #24
Steven Merrill CreditAttribution: Steven Merrill commentedSadly, even CentOS 6 includes PEAR 1.9.0, which is one minor version away from having the Host: header fix.
I put in a support request to GitHub just to see if they'll entertain it.
Otherwise, forcing an upgrade of PEAR itself does work both on CentOS 5.6 and 6.
Comment #25
highermath CreditAttribution: highermath commentedI think that changing the hint to "pear upgrade pear" might be a more universal approach.
It would be great if all of the workarounds here were in the documentation.
Comment #26
greg.1.anderson CreditAttribution: greg.1.anderson commentedPerhaps someone could make an effort to collect all of the workarounds and submit a suggested change for the main project page that encompasses all of the remediation steps as succinctly as possible. One command (or a short sequence of commands) that works for everyone and avoids akward "if this then that" instructions would be best. I'm still uncertain about the suggestion to include "sudo", but since we have Windows-specific instructions, maybe we put the "sudo" in now?
Comment #27
mehuls CreditAttribution: mehuls commenteduse followin command
pear channel-discover pear.drush.org
If it doesn't work directly do following commands first
pear upgrade –force Console_Getopt
pear upgrade –force pear
pear upgrade-all
Comment #28
greg.1.anderson CreditAttribution: greg.1.anderson commentedI modified the main project page with something similar to #27.
Comment #29
Steven Merrill CreditAttribution: Steven Merrill commentedGitHub is at least aware of the issue. Here's what they sent me. No promises, but this might fix itself at some point.
Comment #30
moskito CreditAttribution: moskito commentedThe text as is now
sounds for me like one should run only #19, instead of run
to install it correctly if channel-discover fails.
My text suggestion:
Also would be nice to define a minimum PEAR version needed somewhere. Since, a more technical person could install the PEAR version he wants.
Comment #31
moshe weitzman CreditAttribution: moshe weitzman commentedi think project page now says all that is discussed here.
Comment #32
arnoldbird CreditAttribution: arnoldbird commentedIn Ubuntu 10.04 server, I had to do this...
pear upgrade –force Console_Getopt
pear upgrade –force pear
pear upgrade-all
pear channel-discover pear.drush.org
pear channel-discover pear.drush.org
pear install drush/drush
Yes, that's right, I had to do the channel-discover twice. I am certain I ran the same command twice because I up arrowed in my terminal to run it again.
Comment #34
leroysteinbacher CreditAttribution: leroysteinbacher commentedAfter running
sudo pear install drush/drush
I'm getting this:
Failed to download drush/drush, latest release is version 4.0.0, but it requires PHP version "5.0.0", use "channel://pear.drush.org/drush-4.0.0" to install
I tried:
sudo pear install drush/drush-4.0.0
and got:
drush/drush requires PHP (version >= 5.0.0), installed version is 4.4.9
php --version
is giving me PHP 5.2.4I still have PHP 4.4.9 used by Max OS X Apache (usr/lib/php)
But I've pointed my .bash_profile to my php5 directory.
PATH=/usr/local/php5/bin/:$PATH
export PATH
How do I point PEAR to the latest PHP version?
The long version of this story is here:
http://www.technecal.com/node/17
Thanks!
Leroy Steinbacher
Comment #35
ccoppen CreditAttribution: ccoppen commentedDrush attempts to use the CGI version of PHP which is what is happening here. You need to change the Drush config to point to the correct version of PHP. I remember it in the documentation, but not sure where.
Comment #36
mattreba CreditAttribution: mattreba commentedI received the following warning:
Even though it said it upgraded I still could not get channel-discover to work. After running the channel-update as suggested by the warning and then rerunning the pear upgrade commands previously suggested I was able to do the channel-discover and install drush.
Comment #37
ahimsauziIf you are using MAMP 2.0 and PEAR is not recognized, have a look at this article:
http://bigdiver.wordpress.com/2011/11/10/mamp-2-0-pear-and-phpunit-insta...
In my case, pear.conf was reporting as corrupted and had to be removed before I can upgrade pear.
Once I upgraded pear, drush install was a breeze!
~Uzi
Comment #38
ovi_mihai CreditAttribution: ovi_mihai commentedSteps I followed to install drush
upgrading pear solved the problem.
on ubuntu should add the sudo in front
Comment #39
Ken Hawkins CreditAttribution: Ken Hawkins commentedRunning on CentOS 5.8, I had much the same issue, but no fix mentioned here has worked.
Pear version installed was 1.4.9 leaving me unable to upgrade pear, as a newer version of pear was needed. X.x
This worked:
Then all worked as expected.
Comment #40
Harry Slaughter#3 fixed it for me. Ubuntu vOLD
Comment #41
fureigh CreditAttribution: fureigh commented+1 for #27. Those steps were necessary on my Mac even after running
sudo pear channel-update pear.php.net
.(Disregard the version number; it's just a required field for adding this comment.)
Comment #42
Kristen Pol#39 worked for me! Thanks Ken :)
Comment #43
ZenDoodles CreditAttribution: ZenDoodles commentedThis is either broken again or still a problem...
Note:
Dunno what else to try. Meanwhile, I guess I'll do it the old fashioned way...
Comment #44
greg.1.anderson CreditAttribution: greg.1.anderson commentedI have Pear 1.9.4 stable as well, and the channel discovery seems to be working okay for me at the moment.
Comment #45
romaingar CreditAttribution: romaingar commentedhello can't access the pear'channel,
this is my system configuration :
I've follow #34 with no success, and udate pear to 1.9.4. with no succes
It's seems that the problem is with my hosting (1and1), because i'm not root on my ssh session. that's all...
Comment #46
greg.1.anderson CreditAttribution: greg.1.anderson commentedIf you cannot access the pear channel due to restricted permissions on a shared hosting service, install manually by another technique. See README.txt for more information.
Comment #48
Steven Merrill CreditAttribution: Steven Merrill commentedAs an aside after the fact, It looks as though GitHub Pages finally supports requests with port numbers in the Host header:
Comment #49
marcnz CreditAttribution: marcnz commentedI think it is time to re-open this issue!
[root@s1 ~]# pear version
PEAR Version: 1.10.1
PHP Version: 5.5.9-1ubuntu4.14
Zend Engine Version: 2.5.0
Running on: Linux s1 2.6.32-042stab111.11 #1 SMP Tue Sep 1 18:19:12 MSK 2015 x86_64
[root@s1 ~]# pear channel-discover pear.drush.org
Discovering channel pear.drush.org over http:// failed with message: channel-add: Cannot open "http://pear.drush.org/channel.xml" (Connection to `pear.drush.org:80' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known)
Trying to discover channel pear.drush.org over https:// instead
Discovery of channel "pear.drush.org" failed (channel-add: Cannot open "https://pear.drush.org/channel.xml" (Connection to `pear.drush.org:443' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known))
I tried all the pear upgrade --force listed in the thread without any luck!
Any solution found?
Comment #50
robproper CreditAttribution: robproper commentedI just ran into the same problem. A little over a week ago this problem did not exist.
However, now the problem is different though. The original problem was a HTTP 404 response code
(File http://pear.drush.org:80/channel.xml not valid (received: HTTP/1.1 404 Not Found))
. Now the server cannot be found at all(Connection to `pear.drush.org:80' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known)
. In factpear.drush.org
does not resolve to an IP address. This may be more permanent.Comment #51
sunildias CreditAttribution: sunildias as a volunteer commentedI am assuming that Drush stopped installing through PEAR and the Drush Needs to be installed through composer.
Because Drush is moved to GITHUB and made it as their official project page. https://github.com/drush-ops/drush
And the installation steps are available here http://docs.drush.org/en/master/install/
If you found any other solution. Please post here.
Comment #52
hassan2 CreditAttribution: hassan2 as a volunteer commentedFollow this video instruction to install all you need.
https://www.youtube.com/watch?v=Esvthnt79ac