I was trying to install samba to access shared printer on windows pc connected via office network, following response came out from terminal. please guide me how to install Samba or any other alternative.

crm@crm-HP-G62-Notebook-PC:~$ sudo apt-get install samba
[sudo] password for crm: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 samba : Depends: samba-common (= 2:3.6.6-3ubuntu4) but 2:3.6.6-3ubuntu5 is to be installed
         Depends: libwbclient0 (= 2:3.6.6-3ubuntu4) but 2:3.6.6-3ubuntu5 is to be installed
         Recommends: tdb-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
  • What happens when you enter sudo apt-get update followed by sudo apt-get install samba? – qbi Nov 27 '12 at 17:29
  • Please see sudo apt-get update response. – Ayyaz Nov 28 '12 at 7:11
  • I deleted the output of the update. Because it looks like it simply worked for you. However according to packages.ubuntu.com/quantal/samba the needed packages have changed. So at the moment you should be able to install the package as you wanted. – qbi Dec 12 '12 at 23:04


sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update && sudo apt-get install samba

If it doesn't succeed , then remove those particular packages which dependencies were unmet :

sudo apt-get remove samba-common libwbclient0 tdb-tools

If it doesn't succeed, then you have to do some manual operation.

samba-common (= 2:3.6.6-3ubuntu4) does not exist on the Official Ubuntu repository for Ubuntu 12.10. you could have used a Old repository that containing samba-common (= 2:3.6.6-3ubuntu4)

So you have to find that repository by

apt-cache policy samba-common

In the results, firstly mentioned PPA is the one that causing problems.

You need to find weather it is a Worth repository or Useless. That means weather it has installed a Important Package that you have installed. For that, run :

aptitude search "?origin <ppa name> ?installed"

** Replace <ppa name> with Name of the PPA (Omitting ppa:)

This will list the packages which have been installed from that PPA.

Then, If it is a worth repository that containing other Important package, You have to do pinning.

For that run:

gksudo gedit /etc/apt/preferences

Add following lines to the file and Save.

Package: samba-common
Pin: release o=Ubuntu
Pin-Priority: 200 

Package: samba-common
Pin: release o=LP-PPA-<ppa name>
Pin-Priority: 100

** Replace <ppa name> with name Of the PPA (Omitting ppa:)

Then, Try to install again.

If it is a Useless PPA, remove the PPA and then update.

sudo add-apt-repository --remove <PPA Name> && sudo apt-get update

Then try to install.

The package that owns /etc/samba/smb.conf is


You should be able to copy the config from /usr/share/samba/smb.conf if /etc/samba/smb.conf is missing & then run

sudo dpkg --configure samba-common

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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