Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
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:
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
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


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.