(SOLVED) Something failed in Synaptic (I Think)

Questions about applications and software
Forum rules
Before you post please read how to get help
bradshawd
Level 1
Level 1
Posts: 16
Joined: Thu Oct 13, 2016 7:07 am

(SOLVED) Something failed in Synaptic (I Think)

Postby bradshawd » Tue Nov 21, 2017 9:15 am

Please Help.

Keep getting strange errors when attempting to install or remove a failed package. Unsure as to what has gone on. I wonder if anybody here would be so kind as to look at the output from synaptic and point me in the right direction.

Zim is the package which refused to run and this prompted me to attempt to remove and re-install. but the remove process fails with the following.

Code: Select all

(Reading database ... 444798 files and directories currently installed.)
Removing zim (0.65-2) ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing package zim (--purge):
 subprocess installed 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:
 zim
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up python-configparser (3.3.0r2-2) ...
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 processing package python-configparser (--configure):
 subprocess installed post-installation script returned error exit status 1

Any help much appreciated.

Derek
Last edited by bradshawd on Wed Nov 22, 2017 5:38 am, edited 2 times in total.

User avatar
WharfRat
Level 20
Level 20
Posts: 10267
Joined: Thu Apr 07, 2011 8:15 pm

Re: Something failed in Synaptic (I Think)

Postby WharfRat » Tue Nov 21, 2017 9:40 am

It looks like ImportError: No module named 'ConfigParser' is the culprit.

What does ls -lh /usr/lib/python2.7/ConfigParser* return :?:
Image ImageImage

bradshawd
Level 1
Level 1
Posts: 16
Joined: Thu Oct 13, 2016 7:07 am

Re: Something failed in Synaptic (I Think)

Postby bradshawd » Tue Nov 21, 2017 9:51 am

WharfRat wrote:It looks like ImportError: No module named 'ConfigParser' is the culprit.

What does ls -lh /usr/lib/python2.7/ConfigParser* return :?:


@WharfRat

Sorry forgot the code bit .... Anyhows we get.

Code: Select all

bradshawd@Mint-Laptop ~ $ ls -lh /usr/lib/python2.7/ConfigParser*
-rw-r--r-- 1 root root 28K Nov 19  2016 /usr/lib/python2.7/ConfigParser.py
-rw-r--r-- 1 root root 25K Jun 13 14:48 /usr/lib/python2.7/ConfigParser.pyc
bradshawd@Mint-Laptop ~ $

User avatar
WharfRat
Level 20
Level 20
Posts: 10267
Joined: Thu Apr 07, 2011 8:15 pm

Re: Something failed in Synaptic (I Think)

Postby WharfRat » Tue Nov 21, 2017 10:02 am

Could you export TIME_STYLE="+%Y-%m-%d %H:%M:%S" and do that listing again along with ls -lh /usr/bin/python* and inxi -S

I have to run out for about an hour, but I'll check it when I return.
Image ImageImage

bradshawd
Level 1
Level 1
Posts: 16
Joined: Thu Oct 13, 2016 7:07 am

Re: Something failed in Synaptic (I Think)

Postby bradshawd » Tue Nov 21, 2017 10:39 am

@WharfRat

As requested

Code: Select all

bradshawd@Mint-Laptop ~ $ export TIME_STYLE="+%Y-%m-%d %H:%M:%S"

bradshawd@Mint-Laptop ~ $ ls -lh /usr/lib/python2.7/ConfigParser*
-rw-r--r-- 1 root root 28K 2016-11-19 09:32:31 /usr/lib/python2.7/ConfigParser.py
-rw-r--r-- 1 root root 25K 2017-06-13 14:48:19 /usr/lib/python2.7/ConfigParser.pyc

bradshawd@Mint-Laptop ~ $ ls -lh /usr/bin/python*
lrwxrwxrwx 1 root root    9 2017-11-20 13:25:46 /usr/bin/python -> python3.5
lrwxrwxrwx 1 root root    9 2017-06-13 13:31:51 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3.4M 2016-11-19 09:35:03 /usr/bin/python2.7
lrwxrwxrwx 1 root root    9 2017-06-13 13:31:51 /usr/bin/python3 -> python3.5
-rwxr-xr-x 2 root root 4.3M 2017-09-18 16:59:56 /usr/bin/python3.5
-rwxr-xr-x 2 root root 4.3M 2017-09-18 16:59:56 /usr/bin/python3.5m
lrwxrwxrwx 1 root root   10 2017-06-13 13:31:52 /usr/bin/python3m -> python3.5m
-rwxr-xr-x 1 root root 3.4M 2017-11-20 12:58:37 /usr/bin/python.bak

bradshawd@Mint-Laptop ~ $ inxi -S
System:    Host: Mint-Laptop Kernel: 4.4.0-98-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.7
           Distro: Linux Mint 18 Sarah
           
bradshawd@Mint-Laptop ~ $


Hope this helps.

User avatar
minitux
Level 5
Level 5
Posts: 685
Joined: Tue Sep 12, 2017 10:05 am

Re: Something failed in Synaptic (I Think)

Postby minitux » Tue Nov 21, 2017 11:07 am

Code: Select all

sudo rm /var/lib/dpkg/info/zim.prerm

Code: Select all

sudo rm /var/lib/dpkg/info/zim.postinst

Code: Select all

sudo rm /var/lib/dpkg/info/python-configparser.postinst

Code: Select all

sudo apt install -f

?
Sorry for my English, is not my language

When you ask for support, put the output of inxi -Fxz

User avatar
WharfRat
Level 20
Level 20
Posts: 10267
Joined: Thu Apr 07, 2011 8:15 pm

Re: Something failed in Synaptic (I Think)

Postby WharfRat » Tue Nov 21, 2017 11:41 am

bradshawd,

I don't know what transpired with python, but the /usr/bin/python -> python3.5 symlink is incorrect.

Do not delete anything in /var/lib/dpkg/info/ - enter the following only one line at a time:

Code: Select all

sudo -i
cd /usr/bin
rm python
ln -s python2.7 python
exit
Image ImageImage

User avatar
minitux
Level 5
Level 5
Posts: 685
Joined: Tue Sep 12, 2017 10:05 am

Re: Something failed in Synaptic (I Think)

Postby minitux » Tue Nov 21, 2017 1:28 pm

yes, this is abnormal
bradshawd wrote:lrwxrwxrwx 1 root root 9 2017-11-20 13:25:46 /usr/bin/python -> python3.5


I did not see it before, I was connected by smartphone, after doing what WharfRat said,try to do the things you wanted and if you got any mistakes, post the outputs
Sorry for my English, is not my language

When you ask for support, put the output of inxi -Fxz

bradshawd
Level 1
Level 1
Posts: 16
Joined: Thu Oct 13, 2016 7:07 am

Re: Something failed in Synaptic (I Think)

Postby bradshawd » Tue Nov 21, 2017 6:44 pm

Chaps,

I was beginning to wonder as I have just installed Idle for my son who is learning Python at school on a Micky$oft machine (Bleh) And I had located some destructions on making Python 3 your default.. Had not realised it breaks loads of other stuff. :oops: Luckily I was testing on a machine in the office before completing this on the home desktop.

These are the destructions I had located. https://www.tecmint.com/learn-python-pr ... -in-linux/

I will reset the link back to Python 2.7 which is the original version supplied with Mint and let you know once back in the office tomorrow.

Derek

bradshawd
Level 1
Level 1
Posts: 16
Joined: Thu Oct 13, 2016 7:07 am

Re: Something failed in Synaptic (I Think)

Postby bradshawd » Wed Nov 22, 2017 5:37 am

bradshawd wrote:Chaps,

These are the destructions I had located. https://www.tecmint.com/learn-python-pr ... -in-linux/

I will reset the link back to Python 2.7 which is the original version supplied with Mint and let you know once back in the office tomorrow.

Derek


Returned the symbolic link and Lo :D it all works as it should again.

Should have read the comments first before following the article.. Rookie mistake..... :oops:

Image


Return to “Software & Applications”