I tried to install python-pip
by typing this command:
sudo apt-get install python-pip
And the result is below:
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.6-minimal armhf 2.6.8-1.1
Temporary failure resolving 'mirrordirector.raspbian.org'
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python2.6 armhf 2.6.8-1.1
Temporary failure resolving 'mirrordirector.raspbian.org'
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-pkg-resources all 0.6.24-1
Temporary failure resolving 'mirrordirector.raspbian.org'
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-setuptools all 0.6.24-1
Temporary failure resolving 'mirrordirector.raspbian.org'
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-pip all 1.1-3
Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/python2.6/python2.6-minimal_2.6.8-1.1_armhf.deb Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/python2.6/python2.6_2.6.8-1.1_armhf.deb Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/d/distribute/python-pkg-resources_0.6.24-1_all.deb Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/d/distribute/python-setuptools_0.6.24-1_all.deb Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/python-pip/python-pip_1.1-3_all.deb Temporary failure resolving 'mirrordirector.raspbian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Then I tried to sudo apt-get update
and sudo apt-get update --fix-missing
, but it doesn't work either.
The result was like this:
Err http://raspberrypi.collabora.com wheezy Release.gpg
Temporary failure resolving 'raspberrypi.collabora.com'
Err http://archive.raspberrypi.org wheezy Release.gpg
Temporary failure resolving 'archive.raspberrypi.org'
Err http://mirrordirector.raspbian.org wheezy Release.gpg
Temporary failure resolving 'mirrordirector.raspbian.org'
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/Release.gpg Temporary failure resolving 'mirrordirector.raspbian.org'
W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/Release.gpg Temporary failure resolving 'raspberrypi.collabora.com'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/Release.gpg Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
How can I solve this problem?
7 Answers 7
It looks like you are having problems resolving the various URLs that apt-get is fetching from.
I would try the following:
1.) Check you have an active Internet connection, try google.com with a second machine for example. 2.) If your Raspberry Pi is attached to your home router, check it has an IP# assigned 3.) Try pinging google.com from the command line:
ping google.com
You should see something like:
PING google.com (74.125.226.233): 56 data bytes
64 bytes from 74.125.226.233: icmp_seq=0 ttl=56 time=3.281 ms
64 bytes from 74.125.226.233: icmp_seq=1 ttl=56 time=4.058 ms
64 bytes from 74.125.226.233: icmp_seq=2 ttl=56 time=3.999 ms
If this does not work then it could be either your Internet connection or a DNS issue.
For DNS issues check your resolv.conf file is configured correctly (if you have manually assigned nameservers):
/etc/resolv.conf
If you are using DHCP the resolv.conf should be updated automatically.
-
1sorry to be late replying. the ping doesn't work. DNS was the same as the my pc: mac when I enter ping, they say:
connect: Network is unreachable
I also changed interfaces; dchp -> static so I added address, netmask, gateway.SamuraiT– SamuraiT2013年09月19日 15:16:06 +00:00Commented Sep 19, 2013 at 15:16 -
also,I tried other DNS -
nameserver 8.8.8.8 nameserver 8.8.4.4
then I entered ping and they saidping: unknown host google.com
SamuraiT– SamuraiT2013年09月19日 15:22:45 +00:00Commented Sep 19, 2013 at 15:22 -
even I tried to ping to gateway, it didn't work. so I assume there are some problems with gateway. However, when I pinged from Mac, It worked; the problem isn't gateway itself.SamuraiT– SamuraiT2013年09月19日 15:32:47 +00:00Commented Sep 19, 2013 at 15:32
-
1How did you manage to solve this problem ?user3378649– user33786492015年02月17日 18:44:39 +00:00Commented Feb 17, 2015 at 18:44
-
perfect thanks @IntelligentHeating--worked for me. At first I was thinking it was a DNS issue!gdgr– gdgr2021年03月29日 14:50:57 +00:00Commented Mar 29, 2021 at 14:50
Try
sudo apt-get update
followed by
sudo apt-get upgrade
and then retry installing the python-pip.
I fixed the exact same issue I was having a week ago.
-
3OP clearly does not have internet connection working, your advice is nice, but from the different problem =)lenik– lenik2013年08月29日 10:55:12 +00:00Commented Aug 29, 2013 at 10:55
-
@lenik Maybe, as he tries a bunch of URLs. But I was getting failed to fetch error and a 404 with mirrordirectory. And doing
sudo apt-get update
then doingsudo apt-get install nmap
worked. Whereas prior to the update, I was getting the 404 fetch error on mirrordirectory. Googling the problem brought up this QnA page.barlop– barlop2014年06月18日 13:00:29 +00:00Commented Jun 18, 2014 at 13:00 -
I had a similar problem with "sudo apt-get install dnsutils" (404's, though). This solved the problem.Peter Mortensen– Peter Mortensen2015年10月27日 14:37:44 +00:00Commented Oct 27, 2015 at 14:37
-
No, you had a totally different problem which you thought was similar due to not understanding the error messages.Peter Green– Peter Green2015年10月27日 17:50:13 +00:00Commented Oct 27, 2015 at 17:50
I had the exact same problem, after an error made while setting fixed IP-addresses for my network adapters. sudo nano /etc/network/interfaces
to edit, and make sure no two IP-adresses are the same for one adapter. I had broadcast and gateway on the same address, but that killed internet access.
Also, if you use Pi both with and without network cable, but always with wlan-adapter, you need to set netmask, network, broadcast and gateway for both adapters.
I have just found that mine wouldn't update while using my wifi adapter. I do have a fixed IP address on this so I'm not sure if it's because I'm using the wifi adapter or because I've got it fixed IP. Thought that might help some people as I found that when I reconnected my LAN cable and removed my USB Wifi adapter it worked fine.
-
This is a comment, not an answer: You haven't provided anything that looks like a solution.FKEinternet– FKEinternet2023年10月26日 02:39:31 +00:00Commented Oct 26, 2023 at 2:39
I would recommend checking your Time & Date Settings on your Pi.
Having the wrong time or date affects downloading files hosted on a certificate.
To check, simply boot to desktop "startx", and click on the time on the toolbar. It will say the time and the date!
-
4Or simply type "date" into the command line...M.Herzkamp– M.Herzkamp2017年02月21日 21:31:28 +00:00Commented Feb 21, 2017 at 21:31
-
@M.Herzkamp Indeed, "startx" would do nothing for me :)Math1000– Math10002020年05月25日 18:03:41 +00:00Commented May 25, 2020 at 18:03
It's now March, 2020.
And I'm getting the problems described above.
Several in times in the past few months, I have been able to upgrade my PIs' Raspian without problem.
But I noticed yesterday that my fileserver's clock was off by 10 min or so, even though the Raspberry had been rebooted several times in the past few months.
So I tried installing nptdate: sudo apt-get install ntpdate.
NO GO.
So I tried doing an update: apt-get update (just like did a long time ago with "stretch").
NO GO. All I get is the following:
Err:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Temporary failure resolving 'raspbian.raspberrypi.org'
Err:2 http://mirrordirector.raspbian.org/raspbian buster InRelease
Temporary failure resolving 'mirrordirector.raspbian.org'
Err:3 http://archive.raspberrypi.org/debian stretch InRelease
Temporary failure resolving 'archive.raspberrypi.org'
When are the Raspbian's update servers ever available? I used to have this on Stretch a couple of years ago, and now it's happening again!
-
This is a comment, not an answer: You haven't provided anything that looks like a solution.FKEinternet– FKEinternet2023年10月26日 02:42:43 +00:00Commented Oct 26, 2023 at 2:42
That's normal, it's because python-pip
hasn't a version that can be installed. You must write
sudo apt-get install python3-pip -y
-
1Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.2023年02月15日 10:55:59 +00:00Commented Feb 15, 2023 at 10:55
wget google.com
to confirm the nature of this errorsudo apt-get update --fix-missing
worked for me!