无法创建“文件”(处理时):只读文件系统

无法创建“文件”(处理时):只读文件系统

我正在尝试更新我的软件但出现以下错误:

The package system is broken
Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
The following packages have unmet dependencies:
linux-image-generic-lts-quantal: Depends: linux-image-3.5.0-45-generic but it is not installed***

在此之后,我尝试从软件中心安装软件包linux-image-3.5.0-45-generic,但出现与上面相同的对话框,提示我有未满足的依赖项,我需要安装相同的软件包才能自行安装。

$ sudo apt-get install -f

[sudo] password for shashank: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-image-3.5.0-47-generic linux-image-generic-lts-quantal
Suggested packages:
  linux-lts-quantal-doc-3.5.0 linux-lts-quantal-source-3.5.0
  linux-lts-quantal-tools linux-headers-3.5.0-47-generic
The following NEW packages will be installed:
  linux-image-3.5.0-47-generic
The following packages will be upgraded:
  linux-image-generic-lts-quantal
1 upgraded, 1 newly installed, 0 to remove and 103 not upgraded.
4 not fully installed or removed.
Need to get 0 B/40.8 MB of archives.
After this operation, 158 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 224750 files and directories currently installed.)
Unpacking linux-image-3.5.0-47-generic (from .../linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb (--unpack):
 unable to create `/boot/abi-3.5.0-47-generic.dpkg-new' (while processing `./boot/abi-3.5.0-47-generic'): Read-only file system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic
run-parts: executing /etc/kernel/postrm.d/zz-runlilo 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

节目的产出uname -r

$ uname -r
3.5.0-44-generic

我在终端中输入了命令sudo mount,以下是输出

shashank@shashank-HP-ProBook-445-G1:~$ sudo mount
/dev/sda6 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type vfat (rw,errors=remount-ro)
/dev/sda5 on /home type ext4 (rw,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/shashank/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=shashank)

答案1

您需要将文件系统重新挂载为读写,否则将失败:

dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb (--unpack):
 unable to create `/boot/abi-3.5.0-47-generic.dpkg-new' (while processing `./boot/abi-3.5.0-47-generic'): Read-only file system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

使用sudo mount | grep -v rw找出以只读方式挂载的设备,然后运行:

sudo mount -o remount,rw /dev/sda1

sda1用以只读方式安装的任何设备进行替换,但我很确定它会是/boot

答案2

我今天遇到了完全相同的问题。并按如下方式解决:

在终端窗口中...删除了下载的内核的.deb文件,就我而言:

sudo rm /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_i386.deb

然后再次运行更新管理器,刷新它。不确定这是否有用,但我还是这么做了。

sudo apt-get -f install

这将重新下载 deb 文件并顺利安装。

希望这能有所帮助。至少在我看来,deb 文件在更新管理器首次下载时就被损坏了。

相关内容