I was trying to install ruby on my remote server(this is a vm machine(debian) in a esxi server . ) I got this error:
The Command:
sudo apt-get install ruby1.8
Error :
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
then I tried :
sudo dpkg --configure -a
Output:
dpkg: unable to access dpkg status area: Read-only file system
UPDATE:
output of mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /home type ext4 (rw)
mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
It's possible that information reported by mount(8) is not
up to date. For actual information about system mount points
check the /proc/mounts file.
What should I do ?
It seems like your /dev/sda3 has had an error and has been remounted with ro. you can verify this by looking at
cat /proc/mountsdmesg | grep sda3might hold information on what went wrong with your filesystem.It seems like your /dev/sda3 has had an error and has been remounted with ro. you can verify this by looking at
cat /proc/mountsdmesg | grep sda3might hold information on what went wrong with your filesystem.