apt-get update error


13 posts
by rleyden » Wed Jun 20, 2012 1:20 am
This may have covered in previous posts regarding delays in updating the RPi source lists, but I'm not sure because the previous posts dealt with specific packages.
I get the following error;
Code: Select all
root@raspbian:~# apt-get update
Ign http://ftp.uk.debian.org squeeze InRelease
Hit http://ftp.uk.debian.org squeeze Release.gpg
Hit http://ftp.uk.debian.org squeeze Release
W: Failed to fetch http://ftp.uk.debian.org/debian/dists/squeeze/Release  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Looking at the link in my browser, I can't even find a directory " ../squeeze/Release". There is a folder "../squeeze/main" but not "Release".

Do I just wait a few hours?

-Rich
User avatar
Posts: 54
Joined: Thu Jun 14, 2012 2:17 am
by SirLagz » Wed Jun 20, 2012 1:38 am
Use the Raspbian mirrors, not the official ones.
armhf for any other version of Debian will break everything on the Pi as the Debian armhf port doesn't support the BCM on the Pi, and apt won't get anything that is armel by default as Raspbian is setup as armhf
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by rleyden » Wed Jun 20, 2012 2:01 am
SirLagz wrote:Use the Raspbian mirrors, armhf


Sounds good. I didn't knowingly or intentionally change mirrors. I did run aptitude when I couldn't find the packages I wanted and it seemed to grind away for hours. Doesn't aptitude just use the same source list as apt-get?

Anyway, how do I fix this now?
User avatar
Posts: 54
Joined: Thu Jun 14, 2012 2:17 am
by SirLagz » Wed Jun 20, 2012 2:12 am
Edit /etc/apt/sources.list
use these lines instead of what's in there at the moment
Code: Select all
deb http://archive.raspbian.org/raspbian wheezy main
deb-src http://archive.raspbian.org/raspbian wheezy main
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by mpthompson » Wed Jun 20, 2012 2:14 am
rleyden wrote:Sounds good. I didn't knowingly or intentionally change mirrors. I did run aptitude when I couldn't find the packages I wanted and it seemed to grind away for hours. Doesn't aptitude just use the same source list as apt-get?

Anyway, how do I fix this now?


rleyden, aptitude and apt-get should share the same source list. There is no way that I can think of that your repository was changed to the Debian squeeze repository. Are you sure you are running Raspbian and not the Debian squeeze image?

Anyway, your '/etc/apt/sources.list' file on a Raspbian system should look as described here:

http://www.raspbian.org/RaspbianFAQ#Wha ... ository.3F
User avatar
Forum Moderator
Forum Moderator
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
by rleyden » Wed Jun 20, 2012 2:52 am
mpthompson wrote:Anyway, your '/etc/apt/sources.list' file on a Raspbian system should look as described here:
http://www.raspbian.org/RaspbianFAQ#Wha ... ository.3F

Thanks for your help.
Turns out the source.list was changed. Changing it back seemed to fix things (I hope there aren't hidden landmines).

I think I found how it got changed. I ran the script to install the usb wifi adapter rtl8188cus (didn't work). I notice that the script changes or "updates" the source.list.
I thought I found the script in the Raspbian sub forum, but I could be wrong. I suppose I need to be more careful.
User avatar
Posts: 54
Joined: Thu Jun 14, 2012 2:17 am
by mpthompson » Wed Jun 20, 2012 2:55 am
rleyden wrote:I think I found how it got changed. I ran the script to install the usb wifi adapter rtl8188cus (didn't work). I notice that the script changes or "updates" the source.list.
I thought I found the script in the Raspbian sub forum, but I could be wrong. I suppose I need to be more careful.


A script that changes /etc/apt/sources.list without notification? That's pretty hideous. Anyway, I'm glad you got it straightened out.
User avatar
Forum Moderator
Forum Moderator
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
by mdclark » Tue Jun 26, 2012 5:46 pm
Code: Select all
****@raspberrypi ~ $ sudo apt-get update
Hit http://archive.raspberrypi.org wheezy InRelease
Hit http://archive.raspbian.org wheezy InRelease                                 
Hit http://archive.raspberrypi.org wheezy/main armel Packages                       
Hit http://archive.raspbian.org wheezy/main Sources
Ign http://archive.qmh-project.org unstable InRelease
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                   
Ign http://archive.qmh-project.org unstable Release.gpg             
Ign http://archive.qmh-project.org unstable Release
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Ign http://archive.qmh-project.org unstable/main armel Packages/DiffIndex
Hit http://archive.qmh-project.org unstable/main armel Packages
Ign http://archive.qmh-project.org unstable/main Translation-en_GB
Ign http://archive.qmh-project.org unstable/main Translation-en
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/InRelease  Unable to find expected entry 'main/binary-armel/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.


Hi,

I have a similar issue, but my /etc/apt/sources.list contains the correct contents:

Code: Select all
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


I am a bit of a noob when it comes to linux and would appreciate any help.
Thanks.
Posts: 1
Joined: Tue Jun 26, 2012 5:41 pm
by mpthompson » Wed Jun 27, 2012 1:32 am
mdclark wrote:I have a similar issue, but my /etc/apt/sources.list contains the correct contents:


The error in the output you gave is:

Failed to fetch http://archive.raspbian.org/raspbian/di ... /InRelease Unable to find expected entry 'main/binary-armel/Packages' in Release file (Wrong sources.list entry or malformed file)


Notice 'binary-armel' is specified. This is very curious and something I can't explain. For some reason, you system Raspbian system believes it is "armel" rather than "armhf". Perhaps someone else can explain why 'apt-get' might make this mistake?
User avatar
Forum Moderator
Forum Moderator
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
by plugwash » Wed Jun 27, 2012 2:16 am
Most likely he doesn't have a raspbian system at all.
Forum Moderator
Forum Moderator
Posts: 2191
Joined: Wed Dec 28, 2011 11:45 pm
by salinankarbon » Thu Jun 28, 2012 2:15 am
Hi!

The /etc/apt/sources.list that came with the "official" wheezy image is
Code: Select all
deb http://http.debian.net/debian wheezy main contrib non-free


To add to the discussion above. :)

Am wondering whether there's any other mirror for that around. That repo can be painfully slow.
Posts: 1
Joined: Wed Jun 27, 2012 3:44 am
Location: Kuala Lumpur
by mpthompson » Thu Jun 28, 2012 5:17 pm
salinankarbon wrote:Hi!

The /etc/apt/sources.list that came with the "official" wheezy image is
Code: Select all
deb http://http.debian.net/debian wheezy main contrib non-free


To add to the discussion above. :)

Am wondering whether there's any other mirror for that around. That repo can be painfully slow.


Your question is probably best directed to the forums that deal with the official Debian Wheezy armel beta that was released by the Raspberry Pi Foundation. This forum is for Raspbian which is an unofficial port of Debian Wheezy armhf which requires a completely independent set of specifications in your /etc/apt/sources.list file.

To answer your question, there are dozens of alternate Debian repositories. The site that I like to use for locating alternate repositories which are geographically nearby is:

http://debgen.simplylinux.ch/
User avatar
Forum Moderator
Forum Moderator
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
by hennertype » Sat Feb 16, 2013 12:53 pm
Thanks

The below repository? worked for me.

deb http://http.debian.net/debian wheezy main contrib non-free
Posts: 7
Joined: Sun Jul 15, 2012 10:20 pm