Dpkg error on update

My YunoHost server

Hardware: Old laptop or computer
YunoHost version: 11.2.10.3
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue


Hello,

I ran a system update using webadmin but when I tried to update the apps, I got this error:

I found this thread from a couple of years ago, but am not able to understand how I can apply it to my problem. Mine seems to be related to samba.

When I ran dpkg configure, I got the following:

$ sudo dpkg --configure -a
[sudo] password for peterm: 
Setting up samba-common-bin (2:4.13.13+dfsg-1~deb11u6) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 samba-common-bin
sudo dpkg --audit

gave me:

~$ sudo dpkg --audit
[sudo] password for peterm: 
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 samba-common-bin     Samba common files used by both the server and the client
sudo dpkg --configure samba-common-bin

gave me:

$ sudo dpkg --configure samba-common-bin
Setting up samba-common-bin (2:4.13.13+dfsg-1~deb11u6) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 samba-common-bin

At this point, I’m way out of my depth. Any guidance would be greatly appreciated.

Hmmm it looks like it doesn’t like /etc/samba/smb.conf (but it ain’t clear - nor why)

Can you share the output of cat /etc/samba/smb.conf ?

And ls -l /etc/samba/smb.conf ?

On the internets, some people were able to fix this issue with:

sudo apt-get remove --purge *samba*
sudo apt-get install samba

But be careful with the first command, because this may also remove some app’s virtual dependency that wanted to install samba (maybe Nextcloud?) and may cause further issue, don’t hesitate to share what’s apt is displaying and we can review what it says before savagely pressing “Yes”

1 Like

For added security, don’t hesitate to launch the 1st order in “dry run” mode before jumping in :wink:

sudo apt-get remove --purge --dry-run *samba*
2 Likes

Hi Aleks,

cat: /etc/samba/smb.conf: No such file or directory

That doesn’t look good, does it? I remember I did briefly install the samba app, but it didn’t do what I wanted it to and I removed it. I wonder whether that had an effect.

The other command, of course, had basically the same output.

Thanks to both of you for your help. I’m sorry for the delay in replying, but my life has changed and I have to grab the odd half-hour for hobbies now. It’s very frustrating.

As @fipaddict suggested, I’ve done a dry run of the purge command and the output is here:

https://paste.yunohost.org/biriwiwosu.pl

The bit that seems pertinent is;

The following packages will be REMOVED:
  libsmbclient* nextcloud-ynh-deps* python3-samba* samba-common*
  samba-common-bin* samba-dsdb-modules* samba-libs* smbclient*

However, it does look as though I don’t actually have samba installed, doesn’t it?