How to fix software sources to do updates?

Asked by Daniel Castro

Hello,

This started a few days ago and I haven't been able to fix it.
Basically if I run:

sudo apt-get update

I get a lot of errors. See the output of running that command at http://paste.ubuntu.com/138277/

I tried going into System -> Administration -> Software Sources and unselected everything from the 1st, 2nd and 3rd tabs and then started selecting things back until I got an error.
So at the moment I have everything selected on the Ubuntu software and Third-Party Software tabs. When I got to the Updates tab I can select the 1st option (intrepid-security) and run update and all is fine, but then if I select the second one (intrepid-proposed) I start getting errors.

I also tried the "Choose best server" option on the download from part.

At the moment, on Software Sources I have selected main, universe, restricted and multiverse. I have unselected all third-party software to avoid problems there and selected intrepid-security and intrepid-updates for the updates and I get this output http://paste.ubuntu.com/138294/

What's going on? How can I fix this?

Thanks a lot!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Castro
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Below my Ubuntu Intrepid 8.10 /etc/apt/sources.list there is also the medibuntu repository
if you want it please add the gpg key... from terminal:

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

deb http://archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse

## Please report any bug on https://bugs.launchpad.net/medibuntu/
# wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

deb http://packages.medibuntu.org/ intrepid free non-free
deb-src http://packages.medibuntu.org/ intrepid free non-free

deb http://archive.ubuntu.com/ubuntu/ intrepid-proposed restricted main multiverse universe
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-proposed restricted main multiverse universe
deb http://archive.ubuntu.com/ubuntu/ intrepid-backports restricted main multiverse universe
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-backports restricted main multiverse universe

save this and try

sudo apt-get update

Revision history for this message
Daniel Castro (castromd) said :
#2

Thank you.

But still errors.

New output: http://paste.ubuntu.com/138303/

Revision history for this message
Bhavani Shankar (bhavi) said :
#3

Run

apt-get clean then apt-get check

some thing is wrong i think in /var/lib/apt/list

Revision history for this message
Daniel Castro (castromd) said :
#4

I ran those two commands and they didn't throw any errors. But update still throws errors.

Just before that I got a notification for updates, I clicked it but it says that not all updates could be installed and that a partial update could be run. So I did. But it then gave an error window saying "error authenticating some packages". The list of packages on that window are here http://paste.ubuntu.com/138312/

I still have the update notification and I could try to go on without the partial update and go for whatever is selected but I'm scared now. I'd rather wait to see what you have to say.

Thanks!

Revision history for this message
Daniel Castro (castromd) said :
#5

HEY!!!!!!! I fixed it.... wuju!

So... in the terminal I ran:

sudo apt-get clean
sudo apt-get autoclean
sudo rm /var/lib/apt/lists/partial/*
sudo apt-get update

After that te update gave no errors. So I opened "gksu --desktop /usr/share/applications/software-properties.desktop /usr/bin/software-properties-gtk" and went to the updates tab to select intrepid-updates, then did the reload and gave a GPG error again! So I unselected the intrepid-updates from there, did a "sudo apt-get update" again from terminal and no errors.
So next I went into Synaptic and hit the reload button, no errors. From synaptic I went Settings -> Repositories and on the Updates tab selected the intrepid-updates closed and hit the reload button again. NO ERRORS!!!

Don't ask me why.... but it's all good now.

Revision history for this message
Daniel Castro (castromd) said :
#6

Ok... the problem happened again today. I have tried to fix it doing what I did yesterday but no luck this time. This is really weird!

So the error I get now is:

GPG error: http://archive.ubuntu.com intrepid-updates Release: The following signatures were invalid: NODATA 2Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/binary-i386/Packages.bz2 Sub-process bzip2 returned an error code (2)
Some index files failed to download, they have been ignored, or old ones used instead.

What does that error mean?

Revision history for this message
Tom (tom6) said :
#7

Try rebooting and when you get to the boot menu with lots of Ubuntu options choose the one that ends with "Recovery Mode". From the recovery menu choose "Clear some space" and "Repair broken packages"

Hope this helps!

Revision history for this message
Daniel Castro (castromd) said :
#8

Thanks fro the advice. Unfortunately I get the same error there.

Revision history for this message
Daniel Castro (castromd) said :
#9

UPDATE!

Tom: I went into recovery mode and tried to repair broken packages again, it does say it will install one package (ash), but if you proceed it gives the above mentioned errors and won't install it.
So I booted up normally again, went into Synaptic, searched for "ash" and installed it.
After that, errors gone.
So it looks good at the moment, but I'm scared on clicking the Problem Resolved button below just yet. Let's leave it for a couple of days and I'll come back with an update, hopefully a cheerful one.

Revision history for this message
Daniel Castro (castromd) said :
#10

Yes, the fix above did the trick.