Unable to apt-get
Posted: Mon Aug 17, 2015 1:19 pm
I have got a Raspberry Pi 2 Model B and a Raspberry Pi 1 Model B. So I plugged a fresh SD card into the Pi 2 model B with Raspbian. It brings me to raspi-config where I extended, overclocked and finish. After this I proceeded to setting up a static IP so I can connect via ssh from my desktop PC.
Afterwards I'm able to connect via ssh without problem. The issue I'm getting is running "sudo apt-get update". Basically It will NOT connect at all. Just stuck at 0% and nothing more.
I google'd around and found information about dns-nameservers therefore I proceeded to updating the interfaces by adding
but I'm still having issues, I do not understand what is going on.
Screenshots:

Eventually (about 2-3minutes) this will lead to a connection timed out.
Some more information:
The sd card is 32gb.
There is a light at the ethernet port.
I did edit the sources.list since the original did not work but I did not remove the original source.
I'm unable to ping 8.8.8.8 OR google.com
There is no issue when pinging my gateway (192.168.0.1)
I've tested the cable on a different computer and it works perfectly.
Funny thing is that I'm able to put the same sd card into my Raspberry Pi 1 Model B with the same ethenet cable and it will be able to sudo apt-get update without a problem
UNAME -a
IFCONFIG:
IP ADDR:
I apologize that this is a long post but I've already spent hours trying to get this issue solved by browsing the internet for information.
Please help if possible,
Thank you
Code: Select all
sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.11
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
sudo reboot
I google'd around and found information about dns-nameservers therefore I proceeded to updating the interfaces by adding
Code: Select all
dns-nameservers 192.168.0.1 8.8.8.8 8.8.4.4
Screenshots:

Eventually (about 2-3minutes) this will lead to a connection timed out.
Some more information:
The sd card is 32gb.
There is a light at the ethernet port.
I did edit the sources.list since the original did not work but I did not remove the original source.
I'm unable to ping 8.8.8.8 OR google.com
There is no issue when pinging my gateway (192.168.0.1)
I've tested the cable on a different computer and it works perfectly.
Funny thing is that I'm able to put the same sd card into my Raspberry Pi 1 Model B with the same ethenet cable and it will be able to sudo apt-get update without a problem
UNAME -a
Code: Select all
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux
Code: Select all
eth0 Link encap:Ethernet HWaddr
inet addr:192.168.0.11 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2891 errors:0 dropped:1 overruns:0 frame:0
TX packets:1095 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:159627 (155.8 KiB) TX bytes:205886 (201.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 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)
Code: Select all
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether brd ff:ff:ff:ff:ff:ff
inet 192.168.0.11/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
Please help if possible,
Thank you