I have Ubuntu 16.04. I installed many packages from default repositories by apt-get but I have been getting this dpkg error since yesterday night. I am new to Linux so I don't know much.

I am getting this on sudo apt install <package_name>:

$ sudo apt install python-gnuplot 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following additional packages will be installed:
  libblas-common libblas3 libgfortran3 liblapack3 python-numpy
Suggested packages:
  gfortran python-dev python-nose python-numpy-dbg python-numpy-doc
The following NEW packages will be installed:
  libblas-common libblas3 libgfortran3 liblapack3 python-gnuplot python-numpy
0 upgraded, 6 newly installed, 0 to remove and 237 not upgraded.
1 not fully installed or removed.
Need to get 4,192 kB/9,365 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libblas-common amd64 3.6.0-2ubuntu2 [5,342 B]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libblas3 amd64 3.6.0-2ubuntu2 [147 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgfortran3 amd64 5.3.1-14ubuntu2.1 [260 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 liblapack3 amd64 3.6.0-2ubuntu2 [1,938 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-numpy amd64 1:1.11.0-1ubuntu1 [1,763 kB]                                   
Get:6 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 python-gnuplot all 1.8-6 [79.1 kB]                                            
Fetched 4,192 kB in 20s(202kB/s)                                                                                                            
Selecting previously unselected package libblas-common.
 (Reading database ... 186488 files and directories currently installed.)
 Preparing to unpack .../libblas-common_3.6.0-2ubuntu2_amd64.deb ...
Unpacking libblas-common (3.6.0-2ubuntu2) ...
Selecting previously unselected package libblas3.
Preparing to unpack .../libblas3_3.6.0-2ubuntu2_amd64.deb ...
Unpacking libblas3 (3.6.0-2ubuntu2) ...
Selecting previously unselected package libgfortran3:amd64.
Preparing to unpack .../libgfortran3_5.3.1-14ubuntu2.1_amd64.deb ...
Unpacking libgfortran3:amd64 (5.3.1-14ubuntu2.1) ...
Selecting previously unselected package liblapack3.
Preparing to unpack .../liblapack3_3.6.0-2ubuntu2_amd64.deb ...
Unpacking liblapack3 (3.6.0-2ubuntu2) ...
Selecting previously unselected package python-numpy.
Preparing to unpack .../python-numpy_1%3a1.11.0-1ubuntu1_amd64.deb ...
Unpacking python-numpy (1:1.11.0-1ubuntu1) ...
Selecting previously unselected package python-gnuplot.
Preparing to unpack .../python-gnuplot_1.8-6_all.deb ...
Unpacking python-gnuplot (1.8-6) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
dpkg: error processing package samba-libs:amd64 (--configure):
 package samba-libs:amd64 is not ready for configuration
 cannot configure (current status 'half-installed')
Setting up libblas-common (3.6.0-2ubuntu2) ...
Setting up libblas3 (3.6.0-2ubuntu2) ...
update-alternatives: using /usr/lib/libblas/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode
Setting up libgfortran3:amd64 (5.3.1-14ubuntu2.1) ...
Setting up liblapack3 (3.6.0-2ubuntu2) ...
update-alternatives: using /usr/lib/lapack/liblapack.so.3 to provide /usr/lib/liblapack.so.3 (liblapack.so.3) in auto mode
Setting up python-numpy (1:1.11.0-1ubuntu1) ...
Setting up python-gnuplot (1.8-6) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • have you tried sudo apt-get install -f to finish the install ?
    – Amias
    Jul 4, 2016 at 14:36
  • it also give same error bro Jul 4, 2016 at 14:40

3 Answers 3


This is a known bug and is being worked on. Add yourself to the affected users list on this page:


  • with all the recent security issues with SMB/CIFS protocols its worth considering carefully where you use this and ensuring you use an updated version of samba or something else entirely.
    – Amias
    Sep 8, 2017 at 12:37

This worked for me:

sudo apt-get install --reinstall samba-libs:amd64

Try This:

sudo systemctl stop nmbd

sudo systemctl disable nmbd

Then run:

sudo apt-get install --reinstall samba-libs:amd64

apt should be good to go from there.

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.