-1

Recently re-booted my fileserver and found it would not boot. I'm currently in recovery mode for the previous kernel 3.13.0-62-generic on 14.04.

When i run sudo dpkg --configure -a or sudo apt-get upgrade, or sudo apt-get install -f, I get the following error:

austin@FSERV:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-samba (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 237, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 578, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 524, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 408, in _init_posix
    from _sysconfigdata import build_time_vars
  File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
    from _sysconfigdata_nd import *
ImportError: No module named _sysconfigdata_nd
dpkg: error processing package python-samba (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on python-samba; however:
  Package python-samba is not configured yet.

dpkg: error processing package samba-common-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of samba:
 samba depends on python-samba; however:
  Package python-samba is not configured yet.
 samba depends on samba-common-bin (= 2:4.1.6+dfsg-1ubuntu2.14.04.9); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of winbind:
 winbind depends on samba (= 2:4.1.6+dfsg-1ubuntu2.14.04.9); however:
  Package samba is not configured yet.

dpkg: error processing package winbind (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnss-winbind:amd64:
 libnss-winbind:amd64 depends on winbind (= 2:4.1.6+dfsg-1ubuntu2.14.04.9); however:
  Package winbind is not configured yet.

dpkg: error processing package libnss-winbind:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-winbind:amd64:
 libpam-winbind:amd64 depends on winbind (= 2:4.1.6+dfsg-1ubuntu2.14.04.9); however:
  Package winbind is not configured yet.

dpkg: error processing package libpam-winbind:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-samba
 samba-common-bin
 samba
 winbind
 libnss-winbind:amd64
 libpam-winbind:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
austin@FSERV:~$

I'm planning to re-install the kernel that is causing a boot failure, but can't do because of this python error. Can anyone provide any insight?

0

The problem here is that python-samba configuration script is (eventually) trying to import _sysconfigdata_nd module, but it can't find it.

There was an Ubuntu package bug that caused exactly that. But it was in early 2013, and you report that you use 14.04, so your packages shouldn't be affected.

Start by running dpkg -S _sysconfigdata_nd.py to verify that this file is indeed installed. If it is not, then you might try reinstalling libpython2.7-minimal package. If it is, run python and type import sys; print sys.path to get a list of directories where python will look for modules. I guess that directory where _sysconfigdata_nd.py is is not on that list.

If it isn't you might try one of workarounds posted in mentioned bug report: sudo ln -s /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py /usr/lib/python2.7/ or sudo pip install --upgrade virtualenv.

It is also possible that your multiarch configuration is broken, but this could only happen if you have modified it sometime in the past.

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.