broken package samba

Asked by Alfonso on 2007-02-08

Hi community!

I've got an broken package (samba) and i cannot fix the problem with Synaptic nor "sudo get-apt install -f".

I sent you the messages sent by the system.

When i try to upgrade samba with Synaptic, this message appears:

E: /var/cache/apt/archives/samba_3.0.22-1ubuntu3.2_i386.deb: subprocess new pre-removal script returned error exit status 102

And in terminal:
/var/cache/apt/archives/samba_3.0.22-1ubuntu3.2_i386.deb
E: Sub process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:

(And that's all folks!)

Can you help me?

TY in advance to the best community on the earth and beyond!

Hal

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Kees Cook
Solved:
2007-02-10
Last query:
2007-02-10
Last reply:
2007-02-10

Can you try:-

$ dpkg --configure samba

.and let us know the results?

Alfonso (a-mansodezuniga) said : #2

Thank you, dear Alan, after doing dpkg --configure samba, I obtained:

dpkg: error processing samba (--configure):
 package samba is already installed and configured
Errors were encountered while processing:
 samba

It gives to you some light?

Thank you again!

On Thu, 2007-02-08 at 21:29 +0000, Alan Pope wrote:
> Your support request #3583 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+ticket/3583
>
> Status: Open => Answered
>
> Alan Pope proposed the following answer:
> Can you try:-
>
> $ dpkg --configure samba
>
> .and let us know the results?
>
> _______________________________________________________________________
> If this answers your request, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+ticket/3583/+confirm?answer_id=0
>
> If you still need support, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+ticket/3583

Best Kees Cook (kees) said : #3

The "prerm" script for samba is located at /var/lib/dpkg/info/samba.prerm
For some reason, the package is failed to correctly stop the samba service. To try to solve this, I would do the following:

 sudo dpkg -P samba samba-common smbclient
 sudo rm -f /etc/rc*.d/*samba /etc/init.d/samba

Then see if re-installing samba will work correctly:

  sudo apt-get install samba

Alfonso (a-mansodezuniga) said : #4

Thank you, Kees, you did it.

And thanks to the best community on the space and beyond!

Alfonso (now smiling, hi!)

Alfonso (a-mansodezuniga) said : #5

Wonderful Kees!!!

Thank you very much!!!

Problem solved. You hit it.

Thank you again,

Alfonso

P. S.: I must study so much things. You're leading me.

On Sat, 2007-02-10 at 02:22 +0000, Kees Cook wrote:
> Your support request #3583 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+ticket/3583
>
> Status: Open => Answered
>
> Kees Cook proposed the following answer:
> The "prerm" script for samba is located at /var/lib/dpkg/info/samba.prerm
> For some reason, the package is failed to correctly stop the samba service. To try to solve this, I would do the following:
>
> sudo dpkg -P samba samba-common smbclient
> sudo rm -f /etc/rc*.d/*samba /etc/init.d/samba
>
> Then see if re-installing samba will work correctly:
>
> sudo apt-get install samba
>
> _______________________________________________________________________
> If this answers your request, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+ticket/3583/+confirm?answer_id=2
>
> If you still need support, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+ticket/3583

I get the same error, but the solution above didn't work for me. Any ideas on how to resolve the problem.

Matt McAdory (matt-mcadory) said : #7

thanks from me as well.

aduff (aduff) said : #8

thanks also from me. the ubuntu community rock

rmcgougan (rmcgougan) said : #9

Thanks a lot fixed my Samba package error Ubuntu Dapper on PPC.

Thanks a lot - this fix has also fixed my broken Samba problem.

Big thsnks to the Ubuntu community :-)

Kerv (vloebergh) said : #11

It worked for me (with some tweaking) and I was able to re-install Samba successfully. I am totally new to ubuntu/linux so I don’t understand why it worked but using Kees Cook’s solution

sudo dpkg -P samba samba-common smbclient
sudo rm -f /etc/rc*.d/*samba /etc/init.d/samba

The first command line worked fine. I didn’t realise the second line actually comprises of two commands (like I said – new to linux) and my machine didn’t like the ‘–f ‘ switch either (invalid option -- /)
 So I tried

sudo rm /etc/rc*.d/*samba

then

sudo rm /etc/init.d/samba

and it worked. Now I’m able to upgrade the system again – brilliant – many thanks.

meestermole (meestermole) said : #12

hallelujah!

This solved a problem that plagued me for hours after i tried to re-install samba on my Debian NSLU2.
Thanks!!!!!!

Matt Burkhardt (matthewboh) said : #13

I'm having a tough time - this does not work for me. I so completely hosed up a Samba install, but after following the directions I get

invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas?