subprocess new pre-removal script returned error exit status 102

Asked by Tshepo on 2006-08-21

Hi all

Please help with this error. This is the message I got after running 'sudo apt-get -f install'

invoke-rc.d: dangling symlink: /etc/rc2.d/K09samba
dpkg: warning - old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: dangling symlink: /etc/rc2.d/K09samba
dpkg: error processing /var/cache/apt/archives/samba_3.0.22-1ubuntu3.1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 102
Errors were encountered while processing:
 /var/cache/apt/archives/samba_3.0.22-1ubuntu3.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Some of the attempts I did to remove this include a solution from MikeBee:
Once I removed '/etc/rc2.d/samba' and '/etc/rc3.d/samba' links are relinked them both to '../init.d/samba' by 'sudo ln -s ../init.d/samba /etc/rc2.d/samba' and 'sudo ln -s ../init.d/samba /etc/rc3.d/samba' then ran 'sudo apt-get -f install' it worked fine.

any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Tshepo
Solved:
2006-08-22
Last query:
2006-08-22
Last reply:
2006-10-09
Tshepo (tshepo-ungana-afrika) said : #1

Seems like Rudi (a colleague) helped me solve the problem, here are the steps.
- got inside this folder by: $ cd /etc/rc2.d/
- and checked all the links, particularly to see the link between K09samba and samba by: $ ls -al (this is what we found K09samba -> /samba)
- then removed K09samba by: $ sudo rm K09samba
- then removed samba by: $ sudo apt-get remove -f samba
- we then did this: sudo apt-get -f install (might not do anything)
- the install samba: $sudo apt-get install samba
- and created the soft link: $ sudo ln -s ../init.d/samba K09samba
Then everything worked. We followed the same procedure in rc3.d strating changing the directory.
Edit/Delete Message

Arek (arek-stryjski-gmail) said : #2

Thank you I had same problem after upgrading to Edgy Eft. I follow your instructions I it looks like it is OK now.

Arek

Ryan O'Connor (ryanoc) said : #3

Thanks I had the same problem after upgrading to Edgy beta. Instructions worked.

Prem Rara (fortran01) said : #4

It works! Same problem when upgrading from Dapper Drake to Edy Eft.

azgs (azgs) said : #5

the remedy works in 2008 also. fixed my problem.
now question opens why the bug not fixed yet by any of users who develop softwares

zeddock (zeddock) said : #6

This method was too involved for me but I was able to uninstall an older wicd from my Hardy via method in this post...
http://wicd.net/punbb/viewtopic.php?id=71

Download the newest stable version of wicd
Open a terminal
paste this in and run it ... sudo mv /var/lib/dpkg/info/wicd.prerm ~/Desktop
This step moves a trouble-making file to the Desktop
Once I did this I was able to Completely Remove the old wicd via Synaptic Manager
Once removed, launch the downloaded latest version to install cleanly.

zeddock

zeddock (zeddock) said : #7

PS. A reboot may be necessary. I was on mine, as I lost connectivity once I uninstalled.

So I did it in these steps:
1. Download the newest stable from https://sourceforge.net/project/showfiles.php?group_id=194573
2. Moved the trouble-file file to somewhere else by opening a terminal and entering this:
    sudo mv /var/lib/dpkg/info/wicd.prerm ~/Desktop
3. Used Synaptic Package Manager to Search for wicd and then Completely Uninstalled it.
4. Click System / Preferences / Sessions
5. in Startup Programs TAB, make sure there are no entries selected that say wicd in them.
    (An older version of wicd had some put a tray.py entry here to give the icon)
6. Double-click on the downloaded ".deb" file to install it.
    (It may complain that there is a version in the packages, but go forward.)
7. Reboot
8. Do you see a wicd icon in your notification tray area?
9. Good job!

zeddock (zeddock) said : #8

Hmmm. Just tried again with a new computer and had to add one other thing:
Go to SYSTEM \ PREFS \ SESSIONS
In STARTUP PROGRAMS tab...
Look for an entry for wicd
If there, select it and click on Edit.
See if the entry says wicd-client in the Command box. If not, change it.

Now reboot. You should see the tray icon in the system tray upon reboot.

Zeddock

eumetaxas (eumetaxas) said : #9

"This method was too involved for me but I was able to uninstall an older wicd from my Hardy via method in this post...
http://wicd.net/punbb/viewtopic.php?id=71

Download the newest stable version of wicd
Open a terminal
paste this in and run it ... sudo mv /var/lib/dpkg/info/wicd.prerm ~/Desktop
This step moves a trouble-making file to the Desktop
Once I did this I was able to Completely Remove the old wicd via Synaptic Manager
Once removed, launch the downloaded latest version to install cleanly.

zeddock"

Thanx!