我apt-get autoremove
在我的 Debian 服务器上使用过,现在apt-get
不会安装或删除任何东西,因为它一直在尝试但无法删除libpam-ck-connector
.
当尝试安装任何东西时......例如,apt-get install php5
(Reading database ... 28566 files and directories currently installed.)
Removing libpam-ck-connector:armhf ...
dpkg: error processing libpam-ck-connector:armhf (--remove):
unable to securely remove '/usr/share/doc/libpam-ck-connector/changelog.gz': Not a directory
Errors were encountered while processing:
libpam-ck-connector:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
我试着跑apt-get install libpam-ck-connector
,却得到了这个……
libpam-ck-connector is already the newest version.
libpam-ck-connector set to manually installed.
The following NEW packages will be installed:
libck-connector0
0 upgraded, 1 newly installed, 0 to remove and 86 not upgraded.
1 not fully installed or removed.
Need to get 0 B/117 kB of archives.
After this operation, 96.3 kB of additional disk space will be used.
Selecting previously unselected package libck-connector0:armhf.
(Reading database ... 28560 files and directories currently installed.)
Unpacking libck-connector0:armhf (from .../libck-connector0_0.4.5-3.1_armhf.deb ) ...
Setting up libck-connector0:armhf (0.4.5-3.1) ...
dpkg: error processing libpam-ck-connector:armhf (--configure):
package libpam-ck-connector:armhf is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
libpam-ck-connector:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
关于如何解决这个问题有什么想法吗?
答案1
您的软件包似乎libpam-ck-connector
不再完整,可能是通过手动删除“usr/share/doc/libpam-ck-connector/changelog.gz”来实现的。
您可以尝试显式安装apt-get remove libpam-ck-connector
,或者如果不起作用,请apt-get install --reinstall libpam-ck-connector
在手动删除之前强制重新安装。
手动删除更多文件/目录(例如您的评论中的文件/目录)可能会起作用,但很容易在系统上留下额外的垃圾。