由于以下错误,我无法在 Ubuntu 10.04 上安装或删除软件包。
$ sudo apt-get autoremove
Password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
busybox
0 upgraded, 0 newly installed, 1 to remove and 9 not upgraded.
1 not fully installed or removed.
Need to get 0B/212kB of archives.
After this operation, 627kB disk space will be freed.
Do you want to continue [Y/n]? y
Selecting previously deselected package nscd.
(Reading database ... 235651 files and directories currently installed.)
Preparing to replace nscd 2.11.1-0ubuntu7.8 (using .../nscd_2.11.1-0ubuntu7.8_amd64.deb) ...
invoke-rc.d: not a symlink: /etc/rc2.d/S76nscd
dpkg: warning: old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: not a symlink: /etc/rc2.d/S76nscd
dpkg: error processing /var/cache/apt/archives/nscd_2.11.1-0ubuntu7.8_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 102
update-rc.d: warning: /etc/rc2.d/S76nscd is not a symbolic link
invoke-rc.d: not a symlink: /etc/rc2.d/S76nscd
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 102
Errors were encountered while processing:
/var/cache/apt/archives/nscd_2.11.1-0ubuntu7.8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我应该怎么做才能解决这个错误?
我努力了
sudo dpkg --remove --force-remove-reinstreq nscd
但它没有作用。
答案1
/etc/rc2.d/S76nscd
用指向的符号链接替换该文件/etc/init.d/nscd
。