Unable to Install Samba after uninstalling?
Solution 1
I guess it's because you uninstalled samba only and wiped out the config file so something stayed installed and without configuration.
I think there are ways to repair, but I would try to reinstall on a "clean" base doing:
sudo dpkg -P samba samba-common smbclient
sudo rm -f /etc/rc*.d/*samba /etc/init.d/samba
before anything and reinstall with sudo apt-get install samba
Solution 2
You have a incompatible shared library in /usr/local. That was installed separately, not as part of a Debian package (Debian packages are not allowed to install to /usr/local). You should remove it, and any other related shared libraries in /usr/local, uninstall all SAMBA packages, then reinstall
Note that the grep result means no process containing "samba" is executing. Only the grep is running; I know this looks a little confusing.
EDIT:
Okay, try:
sudo rm /usr/local/lib/libldap_r-2.4.so.2
This removes a shared library that was separately installed to /usr/local. You may have others there, but you removing the wrong ones could break your system.
sudo apt-get remove samba samba-common smbclient swat samba-doc smbfs libpam-smbpass libsmbclient libsmbclient-dev winbind
This removes all samba-related packages.
Now, reinstall what you need. E.g.:
sudo apt-get install samba
EDIT 2:
Nikolaidis is right. Manually removing all the SAMBA config files was a mistake. Do:
sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf
sudo dpkg --configure -a
Solution 3
Try
ps aux | grep smbd
The process names you should expect to find when running Samba are smbd
and nmbd
, not samba
.
You did run apt-get --purge remove samba
to get rid of your previous Samba installation. But you did not tell which command you used to re-install Samba. So I can only guess where your real problem comes from, and what the possible solution is.
Should you want to install it from your official Debian software repositories, then use the following sequence:
-
apt-get update
(This brings your system's local knowledge about all currently available software packages up to date. This is important!) -
apt-get install samba smbclient
(This does not only install Samba and the Samba client utils, but it also brings all 'dependencies' up to date.)
If this does not help, then run
-
dpkg --configure -a
(This will try to repair a damaged SW package database.)
and repeat the apt-get install ...
command. If this did not help, then run
-
dpkg --force-confmiss --configure samba
(This will install missing config files)
and repeat the apt-get install ...
command.
Solution 4
I fixed my issue by running the following commands:
sudo apt-get remove --purge samba-common
sudo apt-get remove --purge samba
sudo apt-get install samba
Solution 5
try ps aux | grep samba
. Did you stop the previous running instance of samba ?
Simsons
Updated on September 17, 2022Comments
-
Simsons over 1 year
I have removed samba using :
apt-get --purge remove samba
and then Manually removed the smb.conf using
rm *.*
after going to the Samba directory.Now While I trying to install Samba again I am getting the following error:
Starting Samba daemons: nmbd/usr/sbin/nmbd: /usr/local/lib/libldap_r-2.4.so.2: no version information available (required by /usr/sbin/nmbd) /usr/sbin/nmbd: /usr/local/lib/liblber-2.4.so.2: no version information available (required by /usr/sbin/nmbd) failed!
I am unable understand why this is happening. Please help
Edit:
After tryingps aux | grep samba
getting the follwing response:root 25793 0.0 0.0 3088 716 pts/0 R+ 09:17 0:00 grep samba
Have no idea what to do with this?
Edit@Matthew
Now Have the follwoing error: Processing triggers for man-db ...
Setting up samba-common (2:3.2.5-4lenny11) ... Not replacing deleted config file /etc/samba/smb.conf chmod: cannot access `/etc/samba/smb.conf': No such file or directory dpkg: error processing samba-common (--configure): subprocess post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of samba: samba depends on samba-common (= 2:3.2.5-4lenny11); however: Package samba-common is not configured yet. dpkg: error processing samba (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: samba-common samba E: Sub-process /usr/bin/dpkg returned an error code (1)
I have already removed smb.cnf file
-
mistiry almost 14 yearsIn your question above, the output of the
ps aux | grep samba
command showed you one result, and that was thegrep samba
command you ran. If samba was running, you'd have another result listed there.
-
-
Simsons almost 14 yearsNo, I did not stop that and hope there might be some problem. Though I did stop it immedeately after few seconds
-
Simsons almost 14 yearsEdited the Question after getting the response of the command
-
Simsons almost 14 yearsCould you please provide the commands , I am complete newbie in Linux
-
Nikolaidis Fotis almost 14 yearsDeleting everything is not usually considered as good idea ! Try dpkg --configure -a to repair the .deb database and afterwards retry. Propably a force flag is what you need.