10

I am a newbie in this operating system

I installed Ubuntu 12.10 and I found it very interesting to use.

Then once I install chromn from ubuntu software I got

I/O Error

After that I could not install any application.

sudo apt-get install unrar
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

When I type

sudo dpkg --configure -a
dpkg: error: unable to access dpkg status area: Read-only file system

I have tried many solutions like

sudo apt-get autoremove && sudo apt-get clean && sudo apt-get autoclean
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

No used, I am really need your help.

Thank

7

Try using:

sudo mount -o remount /dev/sda1

If sda1 is your hard disk.

  • I got this error mount: cannot remount block device /dev/sda6 read-write, is write-protected – sayvortana Mar 19 '13 at 9:34
  • Can you post the result of: mount -l – smile Mar 19 '13 at 9:45
  • It just show mount: cannot remount block device /dev/sda6 read-write, is write-protected – sayvortana Mar 19 '13 at 9:50
  • Ok, can you create a file? for example doing: touch test and on the other hand, can you paste your /etc/fstab? – smile Mar 19 '13 at 9:53
  • Thank smile, After I delete /var/lib/dpkg/lock I could install application again If there are any error I will post it – sayvortana Mar 19 '13 at 10:02
6

Try deleting the lock file i.e

/var/lib/dpkg/lock

and then run

dpkg --reconfigure -a

This error;

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

causes when software upgrade is interrupted.

You can also follow this link!

  • I think deleting the lock file do the trick After I delete this lock file I could install apt-get install unrar – sayvortana Mar 19 '13 at 9:58
  • I could not vote you up since I don't have enough reputation THank – sayvortana Mar 19 '13 at 9:59
  • I tried to install another software I got fopen: Input/output error debconf: DbDriver "config": could not write /var/cache/debconf/config.dat-new: Read-only file system dpkg: error processing man-db (--unpack): subprocess installed post-installation script returned error exit status 1 Processing triggers for hicolor-icon-theme ... dpkg: unrecoverable fatal error, aborting: unable to flush updated status of hicolor-icon-theme': Read-only file system touch: cannot touch /var/lib/update-notifier/dpkg-run-stamp': Read-only file system E: Sub-process /usr/bin/dpkg returned an error code (2) – sayvortana Mar 19 '13 at 10:49
  • You cannot delete the lock with read-only file system, so this is certainly not a complete solution and I guess the lock will be automatically removed when I make the fs writeable. – inf3rno Jun 8 '17 at 11:26
  • I had to remount the file system as read/write. mount -o remount /dev/dsa1 (if that's the name of your hard drive. df command to see the names of drives). – user79878 Sep 22 '17 at 19:56
2

try this

sudo mount / -o remount,rw 

then run:

sudo dpkg --configure -a
0

Since both the solutions are half complete I added mine based on them. I had this problem by pressing ctrl+c while running a do-release-upgrade.

I used lsblk or fdisk -l to find out which is the partition I need to remount, let's call it /dev/x and it was mounted to /.

I used dmesg to find out whether there was any problem with the partition. I used fsck /dev/x to fix errors if there was any and mount / -o remount,rw to remount the partition in read & write mode.

After that I run pkill dpkg and finally dpkg --reconfigure -a.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.