0

I have recently upgraded to Ubuntu 16.04LTS from 14.04. Everything worked, except for samba. After spending a lot of time on trying to make samba work, I decided to re-install samba. However, when I install samba, I get the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libuser1 python-libuser
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  bind9 bind9utils ctdb ntp winbind
The following NEW packages will be installed:
  samba
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/900 kB of archives.
After this operation, 11.5 MB of additional disk space will be used.
Selecting previously unselected package samba.
(Reading database ... 412707 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.3.9+dfsg-0ubuntu0.16.04.2_amd64.deb ...
Unpacking samba (2:4.3.9+dfsg-0ubuntu0.16.04.2) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up samba (2:4.3.9+dfsg-0ubuntu0.16.04.2) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'binfmt-support' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `binfmt-support'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `binfmt-support'
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

The problem is a known problem related to the Upstart/systemd conversion from Ubuntu 15 upwards. But I am using the Ubuntu 16 repositories, so I should get the correct version of Samba from there: why isn't this happening?

The contents of my /etc/apt/sources.list file is:

#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://ch.archive.ubuntu.com/ubuntu/ xenial main universe
deb-src http://ch.archive.ubuntu.com/ubuntu/ xenial main universe

###### Ubuntu Update Repos
deb http://ch.archive.ubuntu.com/ubuntu/ xenial-security main universe
deb http://ch.archive.ubuntu.com/ubuntu/ xenial-updates main universe
deb-src http://ch.archive.ubuntu.com/ubuntu/ xenial-security main universe
deb-src http://ch.archive.ubuntu.com/ubuntu/ xenial-updates main universe

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

#------------------------------------------------------------------------------#
#                           UNOFFICIAL UBUNTU REPOS                            #
#------------------------------------------------------------------------------#


###### 3rd Party Binary Repos

#### GetDeb - http://www.getdeb.net
## Run this command: wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
deb http://archive.getdeb.net/ubuntu xenial-getdeb apps

#### Gimp PPA - https://launchpad.net/~otto-kesselgulasch/+archive/gimp
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 614C4B38
deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial main

#### GNOME3 Extra Apps PPA - https://launchpad.net/~gnome3-team/+archive/gnome3
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1510FD
deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial main

#### Google Chrome Browser - http://www.google.com/linuxrepositories/
## Run this command: wget -q https://dl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

#### Google Earth - http://www.google.com/linuxrepositories/
## Run this command: wget -q https://dl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main

#### Mozilla Daily Build Team PPA - http://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  247510BE
deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu xenial main

#### Opera - http://www.opera.com/
## Run this command: sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
deb http://deb.opera.com/opera/ stable non-free

#### Oracle Java (JDK) Installer PPA - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
deb http://ppa.launchpad.net/webupd8team/java/ubuntu vivid main

#### ownCloud Desktop Client - http://owncloud.org/
## Run this command: wget -q http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_16.04/Release.key -O- | sudo apt-key add -
deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_16.04/ /

#### PlayDeb - http://www.playdeb.net/
## Run this command: wget -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
deb http://archive.getdeb.net/ubuntu xenial-getdeb games

#### Samsung Unified Linux Driver Repository (SULDR) - http://www.bchemnet.com/suldr/index.html
## Run this command: wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -
deb http://www.bchemnet.com/suldr/ debian extra

#### SimpleScreenRecorder PPA - http://www.maartenbaert.be/simplescreenrecorder/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 283EC8CD
deb http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main

#### Tor: anonymity online - https://www.torproject.org
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 886DDD89
deb http://deb.torproject.org/torproject.org xenial main

#### Unsettings PPA - http://www.florian-diesch.de/software/unsettings/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0FEB6DD9
deb http://ppa.launchpad.net/diesch/testing/ubuntu xenial main

#### Wine PPA - https://launchpad.net/~ubuntu-wine/+archive/ppa/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 883E8688397576B6C509DF495A9A06AEF9CB8DB0
deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial main


####### 3rd Party Source Repos

#### Gimp PPA (Source) - https://launchpad.net/~otto-kesselgulasch/+archive/gimp
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 614C4B38
deb-src http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial main

#### GNOME3 Extra Apps PPA (Source) - https://launchpad.net/~gnome3-team/+archive/gnome3
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1510FD
deb-src http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial main

#### Mozilla Daily Build Team PPA (Source) - http://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  247510BE
deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu xenial main

#### Oracle Java (JDK) Installer PPA (Source) - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu vivid main

#### SimpleScreenRecorder PPA (Source) - http://www.maartenbaert.be/simplescreenrecorder/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 283EC8CD
deb-src http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main

#### Tor: anonymity online (Source) - https://www.torproject.org
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 886DDD89
deb-src http://deb.torproject.org/torproject.org xenial main

#### Unsettings PPA (Source) - http://www.florian-diesch.de/software/unsettings/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0FEB6DD9
deb-src http://ppa.launchpad.net/diesch/testing/ubuntu xenial main

#### Wine PPA (Source) - https://launchpad.net/~ubuntu-wine/+archive/ppa/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 883E8688397576B6C509DF495A9A06AEF9CB8DB0
deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial main

1 Answer 1

0

I found the answer: you not only need to purge samba, but also samba-common, with sudo apt-get purge samba-common. After sudo apt autoremove, you can install samba again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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