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
  • 8,905
  • You have a problem in your system that is resulting in the system being locked in read-only mode. This usually means your system is not clean. Do you still have the installation media for your Ubuntu? I ask because we may need to boot to it to run a file system check cleanly on your system. – Thomas Ward Jul 14 '21 at 17:33
  • Thanks Thomas. Yes, although I am afraid of formatting the disk and losing my information – mfduqued Jul 14 '21 at 19:46
  • You restart your pc, Yoy use initrmfs, con option help. fsck -c -y your damage partition – mfduqued Jul 15 '21 at 17:18
  • Status please... – heynnema Aug 07 '21 at 18:29

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
  • 70,711