ubuntu on chroot apt-get update fail - Unable to parse package

1

1

When I chroot under Ubuntu 12.04 and run apt-get update in my chroot home, I get:

100% [21 Translation-en gzip 0 B] [22 Translation-en bzip2 3E: Unable to parse package file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_precise_multiverse_i18n_Translation-en.decomp (1)

W: Failed to fetch gzip:/var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_precise_main_source_Sources Hash Sum mismatch  

W: Failed to fetch gzip:/var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_precise_universe_i18n_Translation-en Encountered a section with no Package: header             

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

How can I fix this error?

JimmyHo

Posted 2014-07-21T07:08:25.770

Reputation: 11

Answers

1

mount /dev/sda2 /mnt/xxx
mount -t sysfs none /mnt/xxx/sys
mount -t proc none /mnt/xxx/proc
mount --bind /dev/ /mnt/xxx/dev
mount --bind /dev/pts /mnt/xxx/dev/pts
mount -o bind /etc/resolv.conf /mnt/xxx/etc/resolv.conf
chroot /mnt/xxx

Phanidhar Ch

Posted 2014-07-21T07:08:25.770

Reputation: 11

Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so. – DavidPostill – 2015-04-28T09:51:16.847