5

I get this error while running sudo apt-get update

Hit http://mirrordirector.raspbian.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:1 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7379 kB]
100% [1 Packages 7379 kB/7379 kB 100%]Failed to exec method /usr/lib/apt/methods/bzip2
E: Method bzip2 has died unexpectedly!
E: Sub-process bzip2 returned an error code (100)
E: Method /usr/lib/apt/methods/bzip2 did not start correctly

What can it be? This is what I have in my /etc/apt/sources.list

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
Ghanima
  • 15,855
  • 15
  • 61
  • 119
G3z
  • 161
  • 1
  • 6
  • Is it possible for you to translate those errors to English? – Jivings Nov 10 '12 at 14:19
  • @Jivings My edit for that is pending ... – HeatfanJohn Nov 10 '12 at 15:53
  • I run RaspBMC and it contains deb http://archive.raspbian.org/raspbian wheezy main contrib non-free in /etc/apt/sources.list – HeatfanJohn Nov 10 '12 at 19:26
  • Did you run apt-get upgrade first? Looks like it's an error with your mirrorlist. – Jivings Nov 11 '12 at 14:00
  • upgrade doensn't return any error. i've also tried clean with no success – G3z Nov 11 '12 at 14:30
  • Can you show us a dump of your mirrorlist file? – Jivings Nov 11 '12 at 16:32
  • https://gist.github.com/4059495 – G3z Nov 12 '12 at 13:47
  • any idea ? i tried: apt-get clean, removing one line at a time form the sources and running update.checked methods/ folder and i noticed that in ls bzip2 was white while others where green. did a chmod +x on it. still no success – G3z Nov 14 '12 at 22:18
  • first of all, prepends your command with LANG=C to disable your locales and get English error messages. It would be good if you could then update the question with English error messages. Secondly please check dmesg command output to see if there is no traces about segfaults. Also use df to check if you have space left on your disks. – Krzysztof Adamski Nov 15 '12 at 08:45
  • Also check if bzip2 command is working OK. Try compressing some random file and then decompress it. – Krzysztof Adamski Nov 15 '12 at 08:50
  • i found this in dmesg [28765.227866] EXT4-fs error (device mmcblk0p2): ext4_iget:3939: inode #7937: comm find: bogus i_mode (72157) it was also suggested on raspberry forum to reinstall apt packages manually sudo wget http://archive.raspbian.org/raspbian/pool/main/a/apt/libapt-pkg4.12_0.9.7.6+rpi1_armhf.deb sudo wget http://archive.raspbian.org/raspbian/pool/main/a/apt/apt_0.9.7.6+rpi1_armhf.deb sudo dpkg -i libapt-pkg4.12_0.9.7.6+rpi1_armhf.deb apt_0.9.7.6+rpi1_armhf.deb but this lead to some other errors. – G3z Nov 15 '12 at 23:11

1 Answers1

1

In the end it was a filesystem issue! I ended up repairing the FS in ubuntu with fsck -y /dev/sdb and then reinstalling apt manualy as plugwash from RaspberryPi Forum suggested

sudo wget http://archive.raspbian.org/raspbian/pool/main/a/apt/libapt-pkg4.12_0.9.7.6+rpi1_armhf.deb
sudo wget http://archive.raspbian.org/raspbian/pool/main/a/apt/apt_0.9.7.6+rpi1_armhf.deb
sudo dpkg -i libapt-pkg4.12_0.9.7.6+rpi1_armhf.deb apt_0.9.7.6+rpi1_armhf.deb
sudo apt-get update 
Ghanima
  • 15,855
  • 15
  • 61
  • 119
G3z
  • 161
  • 1
  • 6