0

I try to update Ubuntu 20.04 using Synaptic, but the update generates an error:

E: se interrumpió la ejecución de dpkg, debe ejecutar manualmente «dpkg --configure -a» para corregir el problema
E: _cache->open() failed, please report.

W: No se utilizan bloqueos para el fichero de bloqueo de sólo lectura /var/lib/dpkg/lock-frontend W: No se utilizan bloqueos para el fichero de bloqueo de sólo lectura /var/lib/dpkg/lock

I try to fix this error and I get:

dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: File System only read

By reading several tutorials, I found that I should remove the /var/lib/apt/lists/lock file, but when I try to remove it using rm, I get:

rm: does not erase ‘/var/lib/apt/lists/lock’: File System only read

Is there any way to fix this error without reinstalling Ubuntu?

Lorenz Keel
  • 9,511

1 Answers1

1

Your disk is in read-only mode, which usually means there's something wrong with your file system. Do the following to repair this...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot
heynnema
  • 73,649