无法使用 aptitude 在 ubuntu 9.10 上安装任何东西

无法使用 aptitude 在 ubuntu 9.10 上安装任何东西

以前我可以使用“sudo aptitude install”命令安装软件。今天当我尝试安装 rkhunter 时,出现了错误。不仅仅是 rkhunter,我无法安装任何东西。

以下是文本输出:

user@server:~$ sudo aptitude install rkhunter
................
................
20% [3 rkhunter 947/271kB 0%]

Get:4 http://archive.ubuntu.com karmic/universe unhide 20080519-4 [832kB]


40% [4 unhide 2955/832kB 0%]

100% [Working]

Fetched 1394kB in 1s (825kB/s)
Preconfiguring packages ...
Selecting previously deselected package lsof.
(Reading database ... 
................
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 20076 files and directories currently installed.)
Unpacking lsof (from .../lsof_4.81.dfsg.1-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb (--unpack):
 unable to create `/usr/bin/lsof.dpkg-new' (while processing `./usr/bin/lsof'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Selecting previously deselected package libmd5-perl.
Unpacking libmd5-perl (from .../libmd5-perl_2.03-1_all.deb) ...
Selecting previously deselected package rkhunter.
Unpacking rkhunter (from .../rkhunter_1.3.4-5_all.deb) ...
dpkg: error processing /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb (--unpack):
 unable to create `/usr/bin/rkhunter.dpkg-new' (while processing `./usr/bin/rkhunter'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Selecting previously deselected package unhide.
Unpacking unhide (from .../unhide_20080519-4_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/unhide_20080519-4_amd64.deb (--unpack):
 unable to create `/usr/sbin/unhide-posix.dpkg-new' (while processing `./usr/sbin/unhide-posix'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb
 /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb
 /var/cache/apt/archives/unhide_20080519-4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libmd5-perl (2.03-1) ...

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       


Reading state information... 0%

...........
....................

我删除了一些行以减少文本。不过所有错误消息都在这里。我对 Linux 的经验有限,我不确定问题是什么或如何解决。

谢谢。


@Danny Staple 询问 dmesg | tail 的回复

[15124905.180010] TCP: Peer 86.137.106.203:53633/80 unexpectedly shrunk window 4186622621:4186623965 (repaired)         
[15124906.180012] TCP: Peer 86.137.106.203:53633/80 unexpectedly shrunk window 4186622621:4186623965 (repaired)         
[15515559.123663] iftop uses obsolete (PF_INET,SOCK_PACKET)                                                             
[16976290.290013] eth0: no IPv6 routers present                                                                         
[16976291.180014] eth1: no IPv6 routers present                                                                         
[16984092.913895] EXT3-fs: Unrecognized mount option "-" or missing value                                               
[16984099.795068] EXT3-fs: Unrecognized mount option "-errors=remount-ro" or missing value                              
[16984368.841407] EXT3-fs: Unrecognized mount option "w" or missing value                                               
[16984422.110130] EXT3-fs: Unrecognized mount option "noerrors" or missing value                                        
[17249700.060009] TCP: Peer 81.159.138.220:63867/80 unexpectedly shrunk window 2200198177:2200201097 (repaired)

答案1

问题发生在dpkg想要解压*.deb文件的地方,可能是文件系统挂载选项问题:

错误如下:

unable to create `/usr/bin/lsof.dpkg-new' (while processing `./usr/bin/lsof'): Permission denied

您能否在不ro使用选项的情况下挂载文件系统?

暗示

mount / -o remount,rw

您的挂载点在哪里/(可以是任何地方/usr/bin),可能/usr/

答案2

/dev/sda1 在 / 上类型 ext3(rw、noatime、errors=remount-ro)
/proc 上 proc 类型 proc(rw)
/sys 上无类型 sysfs(rw、noexec、nosuid、nodev)
/sys/fs/fuse/connections 上 fusectl 类型 fusectl(rw)
/sys/kernel/debug 上无类型 debugfs(rw)
/sys/kernel/security 上无类型 securityfs(rw)
/dev 上 udev 类型 tmpfs(rw、mode=0755)
/dev/pts 上无类型 devpts(rw、noexec、nosuid、gid=5、mode=0620)
/dev/shm 上无类型 tmpfs(rw、nosuid、nodev)
/var/run 上无类型 tmpfs(rw、nosuid、mode=0755)
/var/lock 上无类型 tmpfs (rw,noexec,nosuid,nodev)
/lib/init/rw 类型 tmpfs 上无 (rw,nosuid,mode=0755)
/dev/.static/dev 类型 ext3 上的 /dev/sda1 (rw)

答案3

有问题的软件包位于软件包缓存中。尝试执行以下操作:

sudo apt-get clean

另一个潜在问题是挂载点可能已满。你试过吗df

相关内容