Problem with package <<Update-Manager>>

Asked by cesar128

i got this error i cant istallanything or make an update...

'E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jaunty-security_restricted_binary-i386_Packages, E:No se pudieron analizar o abrir las listas de paquetes o el archivo de estado.'

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Hi,

First make sure to close all open programs, including all package managers like Synaptic, etc ...

Then please try this procedure:

Step 1: Open Terminal from "Applications->Accessories->
Terminal"

Step 2: Run the following commands (copy-paste each line below to the Terminal then hit <enter> after each line)

sudo rm /var/lib/apt/lists/*
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo aptitude install -f
sudo aptitude update
sudo aptitude dist-upgrade

Step 3: Please post results (copy/paste terminal output from each command) on this thread

Hope it helps,

Regards,

Mark

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

also run:

sudo apt-get clean; sudo apt-get -f install

This can help too

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

By the way mark. If you want to make users lives easier you can use a ; character to put the command on a single line:

sudo rm /var/lib/apt/lists/*; sudo dpkg --clear-avail; sudo dpkg --configure -a; sudo aptitude install -f; sudo aptitude update; sudo aptitude dist-upgrade

Saves having to flick between browser and terminal ;)

Peace

Revision history for this message
cesar128 (ceterre) said :
#4

Sorry i was out of house for about a week.

i got those errors sorry for spanish.:

root@ubuntu:~# rm /var/lib/apt/lists/*
rm: no se puede borrar «/var/lib/apt/lists/partial»: Es un directorio
root@ubuntu:~# sudo rm /var/lib/apt/lists/*
rm: no se puede borrar «/var/lib/apt/lists/partial»: Es un directorio
root@ubuntu:~# sudo dpkg --clear-avail
root@ubuntu:~# sudo dpkg --configure -a
root@ubuntu:~# sudo aptitude install -f
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Inicializando el estado de los paquetes... Hecho
Escribiendo información de estado extendido... Hecho
No se instalará, actualizará o eliminará ningún paquete.
0 paquetes actualizados, 0 nuevos instalados, 0 para eliminar y 0 sin actualizar.
Necesito descargar 0B de ficheros. Después de desempaquetar se usarán 0B.
Escribiendo información de estado extendido... Hecho
E: No se pudo bloquear /var/lib/apt/lists/lock - open (11 Recurso temporalmente no disponible)
E: No se pudo bloquear el directorio de listas...¿es el administrador?
root@ubuntu:~# sudo aptitude update
E: No se pudo bloquear /var/lib/apt/lists/lock - open (11 Recurso temporalmente no disponible)
E: No se pudo bloquear el directorio de listas...¿es el administrador?
root@ubuntu:~# sudo aptitude dist-upgrade
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Leyendo la información de estado extendido
Inicializando el estado de los paquetes... Hecho
Se actualizarán los siguientes paquetes:
  acpid apport apport-gtk cron cups cups-bsd cups-client cups-common
  firefox firefox-3.0 firefox-3.0-branding firefox-3.0-gnome-support
  firefox-gnome-support libcups2 libcupsimage2 libfreetype6 libmpfr1ldbl
  libpurple-bin libpurple0 libwmf0.2-7 libwmf0.2-7-gtk ntpdate pidgin
  pidgin-data python-apport python-problem-report xulrunner-1.9
  xulrunner-1.9-gnome-support
28 paquetes actualizados, 0 nuevos instalados, 0 para eliminar y 0 sin actualizar.
Necesito descargar 17,4MB de ficheros. Después de desempaquetar se usarán 8192B.
¿Quiere continuar? [Y/n/?] Y
Escribiendo información de estado extendido... Hecho
E: No se pudo bloquear /var/lib/apt/lists/lock - open (11 Recurso temporalmente no disponible)
E: No se pudo bloquear el directorio de listas...¿es el administrador?
root@ubuntu:~# aptitude dist-upgrade
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Leyendo la información de estado extendido
Inicializando el estado de los paquetes... Hecho
Se actualizarán los siguientes paquetes:
  acpid apport apport-gtk cron cups cups-bsd cups-client cups-common
  firefox firefox-3.0 firefox-3.0-branding firefox-3.0-gnome-support
  firefox-gnome-support libcups2 libcupsimage2 libfreetype6 libmpfr1ldbl
  libpurple-bin libpurple0 libwmf0.2-7 libwmf0.2-7-gtk ntpdate pidgin
  pidgin-data python-apport python-problem-report xulrunner-1.9
  xulrunner-1.9-gnome-support
28 paquetes actualizados, 0 nuevos instalados, 0 para eliminar y 0 sin actualizar.
Necesito descargar 17,4MB de ficheros. Después de desempaquetar se usarán 8192B.
¿Quiere continuar? [Y/n/?] y
Escribiendo información de estado extendido... Hecho
E: No se pudo bloquear /var/lib/apt/lists/lock - open (11 Recurso temporalmente no disponible)
E: No se pudo bloquear el directorio de listas...¿es el administrador?
root@ubuntu:~#

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#5

Hi,

You got those errors because another package manager - probably a graphical one like Synaptic - had a lock on the /var/lib/apt/lists/lock file. You can only have one package manager at a time running with root privileges at a certain point in time.

So please close ALL running package managers, including the graphical ones running in the panel in the top right or bottom right corner of the screen.

Then rerun the following commands:

sudo apt-get clean
sudo aptitude install -f
sudo aptitude update
sudo aptitude dist-upgrade

Regards,

Mark

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#6

sudo fuser -vki /var/lib/dpkg/lock;sudo dpkg --configure -a

may fix things up. Also, why are you logged in as root? Enabling the account severely reduces the security of your system and is disabled for a reason.

If you used sudo -i then this is fine but logging in and certainly using web facing apps is a massive security risk and is strongly disadvised. The root account is disabled for a reason and is why all guides use the sudo / gksudo / kdesudo command to gain temporary admin power

Revision history for this message
cesar128 (ceterre) said :
#7

thanks all For helping me... :)

actionparsnip thanks for your advice i will use my normal user :) and i got it work

Revision history for this message
cesar128 (ceterre) said :
#8

Thanks actionparsnip, that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Stay off root. Its disabled for a reason. I recommend you re-disable it as attackers will target the account as it is common to all *nix nd BSD systems. If it is disabled there is a 0% chance of success. If it is enabled then they only have to guess the password which has some.

To re-disable please run:

sudo usermod -p '!' root

For more info on why the account being disabled is a fantastic idea read:

https://help.ubuntu.com/community/RootSudo

Thanks