Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am unable to install or remove a package on my Ubuntu 10.04 due to the following error.

$ 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)

What should I do to resolve this error?

I have tried

sudo dpkg --remove --force-remove-reinstreq nscd

but it did not work.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Replace the file /etc/rc2.d/S76nscd with a symlink pointing to /etc/init.d/nscd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.