Package update issue with python-ldb

Post Reply
Message
Author
Jlinuxnew
Posts: 4
Joined: Sat Mar 23, 2019 10:10 pm

Package update issue with python-ldb

#1 Post by Jlinuxnew »

I am running MX linux (64-bit install) on laptop. Usually software updates on this system have been seamless, but I've walked myself into a minor inconvenience at best and possibly a tricky situation that I don't want to figure out alone.

Please help, the situation may involve just a package that is broken (python-ldb) or it also at this point because of some other maneuvers could involve turning back on the correct repositories!!! Oops.

When I go to install the package that is what it says,

Code: Select all

Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python-ldb : Depends: libldb1 (= 2:1.1.27-1+b1) but 2:1.1.27-1+deb9u1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Then if I remember correctly I go to run that and some more error occuring there. So what could be it causing the package to appear unremovable and also not upgradable at the same time?

Actually a "funny" thing this occurs at the same time I completely destroyed my windows partition on the same laptop, but I am 100% that it has nothing to do with this. At least I hope not. I believe there is something in the chain of dependencies now as well because of the packages depending on this python library. Not sure which of these packages none of them seem to be showing any obvious signs of problem. I would ignore the problem but I don't like the consistent warnings and error messages from the package manager.

How would I proceed to diagnose the package manager's claims that this package is broken if it may or may not really be?

Here's the output to the above command if I try to use apt --fix-broken-install...

Code: Select all

root@JRlinux1:/var/log/apt# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libgegl-0.3-0 libllvm3.9
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python-ldb
The following packages will be upgraded:
  python-ldb
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
6 not fully installed or removed.
Need to get 0 B/34.8 kB of archives.
After this operation, 1,024 B disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 346216 files and directories currently installed.)
Preparing to unpack .../python-ldb_2%3a1.1.27-1+deb9u1_amd64.deb ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/python-ldb_2%3a1.1.27-1+deb9u1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-ldb_2%3a1.1.27-1+deb9u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
It's also apparently enough problematic that it causes issues when trying to remove it along with dependants:

Code: Select all

E: system-config-samba: subprocess installed pre-removal script returned error exit status 1
E: python-samba: subprocess installed pre-removal script returned error exit status 1
E: python-ldb: package is in a very bad inconsistent state; you should  reinstall it before attempting a removal
Apt install history.log file
https://pastebin.com/5RWuECfx

User avatar
timkb4cq
Developer
Posts: 3206
Joined: Wed Jul 12, 2006 4:05 pm

Re: Package update issue with python-ldb

#2 Post by timkb4cq »

Sometimes when you get a broken script like this you need to purge the packages (Completely Remove in Synaptic) and then install them again.

However there's another possibility here because this a a Python package.

Code: Select all

ImportError: No module named 'ConfigParser'
ConfigParser was renamed in Python3. Could you have manually changed /usr/bin/python to point to a version 3.x python instead of 2.7? If so, change it back and the upgrade should go through. In MX-17/18 as in debian stretch, python points to 2.x python3 points to 3.x
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

Jlinuxnew
Posts: 4
Joined: Sat Mar 23, 2019 10:10 pm

Re: Package update issue with python-ldb

#3 Post by Jlinuxnew »

Fixed. You were right about the link, but how did you know that??!

Jlinuxnew
Posts: 4
Joined: Sat Mar 23, 2019 10:10 pm

Re: Package update issue with python-ldb

#4 Post by Jlinuxnew »

Oh dug, I see now

Post Reply

Return to “Software / Configuration”