jueves, 12 de marzo de 2009

Jaunty: Apt is broken? Move to another country!

Hi!

You might remember that I had switched to Jaunty to give it a test drive. Well, since yesterday I was having this problem with apt. It was throwing a segmentation fault whenever I tried to work with its repos (upgrade would seg fault, and dist-upgrade, and the same for install). In other words.... a broken apt = an un-upgradable system. Not good. That's not something I wanted to face at all. Having X not start once in a while is something... but having a broken package manager is a whole different story.

After submitting the bug to launchpad and spending a little time at #ubuntu+1 one guy there (Thanks, IntuitiveNipple) noticed that one of the files that apt handles appeared to be broken (/var/cache/apt/pkgcache.bin). I removed the file, but the file stayed there on the FS (go figure!). After some attempts at it, I was able to remove the file. But then I tried to update again... and BOOM! SEGFAULT. It's not going to give itself away so easily.

So.. after about 24 hours I'm stuck with no clue of what to do. I even had the crazy thought of reinstalling kubuntu from scratch (hell, I hated that thought.... made me think of my long forgotten days of formatting every 6 months to reinstall güindous). But I did a simple test instead: Switched my repos to use the venezuelan repositories instead of the colombian ones:

$ sudo su
# cd /etc/apt/
# sed 's/co\./ve\./' sources.list > sources.list.ve
# mv sources.list sources.list.co
# mv sources.list.ve sources.list
# exit
$

And voilà, apt is back on track. So the problem was the repos for colombia after all. Hope they solve it soon.... and why didn't apt complain about a discrepancy or something instead of exploding? Weird.

4 comentarios:

  1. Jeje, you have a little mistake here.. the only repo in Colombia is http://matematicas.unal.edu.co/ubuntu (this one is official now!!)

    co.archive.ubuntu.com and ve.archive.ubuntu.com are just redirections to archive.ubuntu.co

    So, there is no problem in the Colombian repo that you mention, cause.. this is not a Colombian repo, is just a redirection..

    :)

    Hey, if you are in Colombia... check ubuntu-co.com :)

    Saludos :)

    ResponderEliminar
  2. now..... I just made a dig (well... 2 digs) and found this:

    ;; QUESTION SECTION:
    ;co.archive.ubuntu.com. IN A

    ;; ANSWER SECTION:
    co.archive.ubuntu.com. 175 IN A 91.189.88.45
    co.archive.ubuntu.com. 175 IN A 91.189.88.31
    co.archive.ubuntu.com. 175 IN A 91.189.88.40
    co.archive.ubuntu.com. 175 IN A 91.189.88.46

    ;; QUESTION SECTION:
    ;ve.archive.ubuntu.com. IN A

    ;; ANSWER SECTION:
    ve.archive.ubuntu.com. 600 IN A 91.189.88.31
    ve.archive.ubuntu.com. 600 IN A 91.189.88.40
    ve.archive.ubuntu.com. 600 IN A 91.189.88.46
    ve.archive.ubuntu.com. 600 IN A 91.189.88.45

    They are definitely the same boxes (or IPs.... at least). So let's assume there's no virtual domain involved. So.... yesterday (and the day before) when I tried to reach the co repos, I would be getting to the same repos of VE (different repos each time.... you know, statistics)... then why just a change in the domain name of the _same_ repos solved the problem? It makes no sense. Sounds more like an apt bug then.

    ResponderEliminar
  3. You might try this instead
    perl -pie -e 's/co\./ve\./' sources.list

    ResponderEliminar
  4. Sorry extra e there
    perl -pi -e 's/co\./ve\./' sources.list

    ResponderEliminar