slev7n
Posts: 4
Joined: Tue Dec 03, 2013 9:36 pm

get-apt update error

Tue Dec 03, 2013 9:50 pm

Hi guys.
First of all i'ml fairly new to the rpi and english is not my first language. So please excuse me if i make one or another mistake ;) - maybe you can blame autocorrect :)

So here's my problem. I installed raspian wheezy on my device. And whenever i try to use the sudo apt-get .... method it gets stuck.

I'm using an iMac right now and i'm accessing the rip via terminal. I enabled internet-sharing via ethernet over which my mac and the rip are connected.
I tried every fix i could find in the internet and i still have no clue how to fix my problem. But from the top:

1. when i run: sudo apt-get update

Code: Select all

pi@raspberrypi ~ $ sudo apt-get update
Err http://archive.raspberrypi.org wheezy Release.gpg
  Could not resolve 'archive.raspberrypi.org'
Err http://raspberrypi.collabora.com wheezy Release.gpg                                 
  Could not resolve 'raspberrypi.collabora.com'
Err http://mirrordirector.raspbian.org wheezy Release.gpg                               
  Could not resolve 'mirrordirector.raspbian.org'
Reading package lists... Done                 
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/Release.gpg  Could not resolve 'mirrordirector.raspbian.org'

W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/Release.gpg  Could not resolve 'raspberrypi.collabora.com'

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/wheezy/Release.gpg  Could not resolve 'archive.raspberrypi.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
2. I did some research and found out it could maybe have to do something with a common DNS-Server problem. So i ran:

Code: Select all

sudo nano /etc/resolv.config
and added the nameserver 8.8.8.8 and 8.8.4.4

3. I had an internet-dongle attached to my device. I heard that this might cause the problem. I removed it.

4. i tried other things which i can't remember any more.

Please help :) - im totally lost right here

Thank you in advance

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: get-apt update error

Wed Dec 04, 2013 12:32 am

Can you do the following and paste the results here?

On your Raspberry
1. lsusb
2. ifconfig
3. netstat -r

On your Mac
1. ifconfig
2. netstat -r

Thanks.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

slev7n
Posts: 4
Joined: Tue Dec 03, 2013 9:36 pm

Re: get-apt update error

Wed Dec 04, 2013 5:31 pm

First of all thank you, for your replay :) - sooo. your answers.

On the Rpi
1. lsusb

Code: Select all

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
2. ifconfig

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:7d:c1:5b  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:433 errors:0 dropped:0 overruns:0 frame:0
          TX packets:275 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:42954 (41.9 KiB)  TX bytes:47946 (46.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
3. netstat -r

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.2.1     0.0.0.0         UG        0 0          0 eth0
192.168.2.0     *               255.255.255.0   U         0 0          0 eth0
On the Mac

1. ifconfig

Code: Select all

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
	ether 3c:07:54:53:ed:ee 
	nd6 options=1<PERFORMNUD>
	media: autoselect (100baseTX <full-duplex,flow-control>)
	status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 04:54:53:0c:82:32 
	inet6 fe80::654:53ff:fe0c:8232%en1 prefixlen 64 scopeid 0x5 
	inet 192.168.178.28 netmask 0xffffff00 broadcast 192.168.178.255
	nd6 options=1<PERFORMNUD>
	media: autoselect
	status: active
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
	lladdr a4:b1:97:ff:fe:be:ee:70 
	nd6 options=1<PERFORMNUD>
	media: autoselect <full-duplex>
	status: inactive
en3: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
	options=60<TSO4,TSO6>
	ether d2:00:1b:ee:e7:00 
	media: autoselect <full-duplex>
	status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
	ether 06:54:53:0c:82:32 
	media: autoselect
	status: active
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether 3e:07:54:35:30:64 
	inet 192.168.2.1 netmas[code]
k 0xffffff00 broadcast 192.168.2.255
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en0 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 4 priority 0 path cost 0
media: autoselect
status: active[/code]

2. netstat -r

Code: Select all

Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            fritz.box          UGSc           55        0     en1
default            link#9             UCSI            0        0 bridge1
127                localhost          UCS             0        0     lo0
localhost          localhost          UH              1      342     lo0
169.254.225.226    localhost          UHS             0        0     lo0
192.168.2          link#9             UC              3        0 bridge1
localhost          b8.27.eb.7d.c1.5b  UHLWIi          2      386 bridge1   1157
localhost          ff.ff.ff.ff.ff.ff  UHLWbI          0        1 bridge1
192.168.178        link#5             UCS             3        0     en1
fritz.box          9c:c7:a6:d0:4c:bd  UHLWIir        57      891     en1   1092
markuss-imac.fritz localhost          UHS             0       60     lo0
192.168.178.255    ff:ff:ff:ff:ff:ff  UHLWbI          0        1     en1

Internet6:
Destination        Gateway            Flags         Netif Expire
localhost          localhost          UHL             lo0
fe80::%lo0         localhost          UcI             lo0
localhost          link#1             UHLI            lo0
fe80::%en1         link#5             UCI             en1
markuss-imac.local 4:54:53:c:82:32    UHLI            lo0
ff01::%lo0         localhost          UmCI            lo0
ff01::%en0         link#4             UmCI            en0
ff01::%en1         link#5             UmCI            en1
ff02::%lo0         localhost          UmCI            lo0
ff02::%en0         link#4             UmCI            en0
ff02::%en1         link#5             UmCI            en1
I really do hope you can help :)

Thank you

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: get-apt update error

Wed Dec 04, 2013 5:42 pm

Can you ping 192.168.2.1 from your Pi?
Can you ping 192.168.2.2 from your Mac?
Can you ping 192.168.178.28 from your Pi?
Can you ping mirrordirector.raspbian.org from your Mac?
Can you ping 5.153.225.207 from your Mac?
Can you ping 5.153.225.207 from your Pi?

I can't work out the address for fritz.box so we need to redo the netstat -r on your Mac as netstat -nr

The routing table on the Pi looks OK. It says send everything that isn't a local packet to 192.168.2.1 and that system will work out where to send it.

You're then at the mercies of the bridged interfaces on your Mac. That's a problem for me, I've never owned a Mac let alone done bridged networking on one. But it appears that 192.168.178.28 is the gateway out to fritz.box (unknown IP) which is then the gateway to the public Internet.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

slev7n
Posts: 4
Joined: Tue Dec 03, 2013 9:36 pm

Re: get-apt update error

Wed Dec 04, 2013 7:21 pm

all work except 5.153.225.207 from the pi

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: get-apt update error

Wed Dec 04, 2013 8:23 pm

slev7n wrote:all work except 5.153.225.207 from the pi
So the bridged connections on your Mac aren't working.

What's I'd recommend is that you use the Apple system preferences menu to a) disable and b) re-enable connection sharing. You may need to ask the same question you've asked here on an Apple forum.

Sorry I can't help. I'm a Windows8.1, Linux Ubuntu 12.04 and Raspbian Jessie user. I've never ever touched a Mac (last Apple machine I ever used was an Apple ][e).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

slev7n
Posts: 4
Joined: Tue Dec 03, 2013 9:36 pm

Re: get-apt update error

Thu Dec 05, 2013 7:16 pm

Oh my...

First of all Dougie. Thank you so much for all your kind help. It's always nice to have people in forums who are always willing to help. Even helping a morron like me.

I shared the wrong internet connection... this is awkward

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: get-apt update error

Thu Dec 05, 2013 7:34 pm

slev7n wrote:Oh my...

First of all Dougie. Thank you so much for all your kind help. It's always nice to have people in forums who are always willing to help. Even helping a morron like me.

I shared the wrong internet connection... this is awkward
No prob.

There's no such thing as a moron. You're a novice and bridged connections is in my list of advanced topics.
There's also no such thing as a stupid question (assuming you've searched Google before asking). We can't all know everything. I do software support for my day job, I can find things on Google that other folks would never find because I've got thirty years practice at doing keyword searches.

Thanks for the positive words that made my day. :D :D
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”