I am trying to use apt-get to install lynx. However I am having issues with the repositories.
This is what my sources.list looks like:
#deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
What I have tried:
$sudo rm /var/lib/apt/lists/* -vf
$sudo rm /var/lib/dpkg/status
$sudo rm /var/lib/dpkg/status
Sometimes the index files updated ok, more often I get something like this:
Get:1 http://archive.raspbian.org wheezy InRelease [12.5 kB]
Get:2 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Get:3 http://archive.raspbian.org wheezy/main Sources [6,234 kB]
Get:4 http://archive.raspberrypi.org wheezy/main armhf Packages [6,413 B]
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:5 http://archive.raspbian.org wheezy/contrib Sources [52.7 kB]
Get:6 http://archive.raspbian.org wheezy/non-free Sources [97.1 kB]
Err http://archive.raspbian.org wheezy/non-free Sources
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/rpi Sources
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/main armhf Packages
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/contrib armhf Packages
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/non-free armhf Packages
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/rpi armhf Packages
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/contrib Translation-en_GB
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/contrib Translation-en
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/main Translation-en_GB
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/main Translation-en
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/non-free Translation-en_GB
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/non-free Translation-en
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/rpi Translation-en_GB
Unable to connect to archive.raspbian.org:http:
Err http://archive.raspbian.org wheezy/rpi Translation-en
Unable to connect to archive.raspbian.org:http:
Fetched 6,313 kB in 44s (143 kB/s)
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/non-free/source/Sources Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/rpi/source/Sources Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/contrib/binary-armhf/Packages Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/non-free/binary-armhf/Packages Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/rpi/binary-armhf/Packages Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/contrib/i18n/Translation-en_GB Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/contrib/i18n/Translation-en Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/main/i18n/Translation-en_GB Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/main/i18n/Translation-en Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/non-free/i18n/Translation-en_GB Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/non-free/i18n/Translation-en Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/rpi/i18n/Translation-en_GB Unable to connect to archive.raspbian.org:http:
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/rpi/i18n/Translation-en Unable to connect to archive.raspbian.org:http:
E: Some index files failed to download. They have been ignored, or old ones used instead.
Sometimes I am able to update apt-get alright, but the majority of the time I am not able without any errors. In any case I am not able install lynx.
EDIT:
I just ran sudo apt-get install again and was able to update apt-get:
Hit http://archive.raspbian.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://archive.raspbian.org wheezy/main Sources
Hit http://archive.raspbian.org wheezy/contrib Sources
Hit http://archive.raspbian.org wheezy/non-free Sources
Hit http://archive.raspbian.org wheezy/rpi Sources
Get:1 http://archive.raspbian.org wheezy/main armhf Packages [7,387 kB]
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:2 http://archive.raspbian.org wheezy/contrib armhf Packages [23.3 kB]
Get:3 http://archive.raspbian.org wheezy/non-free armhf Packages [47.7 kB]
Get:4 http://archive.raspbian.org wheezy/rpi armhf Packages [14 B]
Ign http://archive.raspbian.org wheezy/contrib Translation-en_GB
Ign http://archive.raspbian.org wheezy/contrib Translation-en
Ign http://archive.raspbian.org wheezy/main Translation-en_GB
Ign http://archive.raspbian.org wheezy/main Translation-en
Ign http://archive.raspbian.org wheezy/non-free Translation-en_GB
Ign http://archive.raspbian.org wheezy/non-free Translation-en
Ign http://archive.raspbian.org wheezy/rpi Translation-en_GB
Ign http://archive.raspbian.org wheezy/rpi Translation-en
Fetched 6,929 kB in 58s (118 kB/s)
Reading package lists... Done
However when I run sudo apt-get install lynx I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
file gcc-4.7-base libbsd0 libbz2-1.0 libc-bin libc6 libgcc1 libgcrypt11 libgnutls26 libgpg-error0 libgpm2 libidn11 libmagic1 libncursesw5 libp11-kit0
libtasn1-3 libtinfo5 lynx-cur mime-support multiarch-support zlib1g
Suggested packages:
glibc-doc debconf debconf-2.0 locales rng-tools gpm
The following NEW packages will be installed:
file gcc-4.7-base libbsd0 libbz2-1.0 libc-bin libc6 libgcc1 libgcrypt11 libgnutls26 libgpg-error0 libgpm2 libidn11 libmagic1 libncursesw5 libp11-kit0
libtasn1-3 libtinfo5 lynx lynx-cur mime-support multiarch-support zlib1g
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,428 kB/10.2 MB of archives.
After this operation, 24.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.raspbian.org/raspbian/ wheezy/main lynx-cur armhf 2.8.8dev.12-2 [2,205 kB]
Get:2 http://archive.raspbian.org/raspbian/ wheezy/main lynx all 2.8.8dev.12-2 [223 kB]
Fetched 2 B in 2s (0 B/s)
Failed to fetch http://archive.raspbian.org/raspbian/pool/main/l/lynx-cur/lynx-cur_2.8.8dev.12-2_armhf.deb rename failed, Input/output error (/var/cache/apt/archives/partial/lynx-cur_2.8.8dev.12-2_armhf.deb -> /var/cache/apt/archives/lynx-cur_2.8.8dev.12-2_armhf.deb).
Failed to fetch http://archive.raspbian.org/raspbian/pool/main/l/lynx-cur/lynx_2.8.8dev.12-2_all.deb rename failed, Input/output error (/var/cache/apt/archives/partial/lynx_2.8.8dev.12-2_all.deb -> /var/cache/apt/archives/lynx_2.8.8dev.12-2_all.deb).
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Edit:
When I type ls in /var/cache/apt/archives I receive this error:
ls: cannot access lynx-cur_2.8.8dev.12-2_armhf.deb: Input/output error
ls: cannot access lynx_2.8.8dev.12-2_all.deb: Input/output error
I am thinking the file system can be corrupt possibly by a bad reboot?
/varfull or near full? I would check your disk space. – Munkeh Dec 20 '12 at 17:43fsckon the drive with the SD card plugged into another machine. My initial thoughts were the I/O errors being the filesystem full, but a corrupt filesystem is more likely. – Munkeh Dec 20 '12 at 18:34