My Java Sir told me to install MySQL-server, workbench, and connector. I did that somehow after spending 30+ hours reading different posts.

After launching Workbench, I went to Tools > Start Shell for MySQL Utilities. Which gave me this popup: https://imgur.com/GQvHKsI

Pressing Download option redirected me to this website: https://imgur.com/ETr2nrY

After installing this package, whenever I run: sudo apt update, I get this error:

pranav@inspiron-5548:~$ sudo apt-get upgrade
[sudo] password for pranav: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 1,362 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 216555 files and directories currently installed.)
Removing mysql-connector-python (8.0.16-1ubuntu19.04) ...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils.sysconfig'
dpkg: error processing package mysql-connector-python (--remove):
 installed mysql-connector-python package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

So, I thought I should uninstall this, and I used sudo apt-get remove --purge mysql-connector-python command, but it also didn't work, and it throws me the same error as above.

What to do? I am in limbo here! Since any new development done in "mysql-utilities" is aged back to Jan 17, 2017, I don't think I will be needing this anymore. I did the mistake trying to install old archived deb package. (newbie)

IF u know, how to remove it, what is it, it would be really helpful to tell me about it.

  • Possible off-topic question. Your title says Ubuntu 19.10 (the development release), but you have tagged 19.04. Ubuntu 19.10 (which I am using myself) is off-topic here due to development status, it has support via irc & other methods - but not here. – guiverc Jul 3 '19 at 5:05
  • @guiverc sorry. I did a stupid silly typing mistake. Why would I ever use development release? I didn't see that coming... sorry. – Pranav Jul 3 '19 at 5:34
  • Have you tried sudo apt -f install (ie. --fix-broken) or dpkg --purge instead of using the apt-get frontend? – guiverc Jul 3 '19 at 7:08
  • @guiverc I get same above error, with dpkg. What else can I do? – Pranav Jul 3 '19 at 7:28

Normally, sudo apt autoremove should have worked but in this case, I used this command to the solved same issue:

sudo mv /var/lib/dpkg/info/mysql-connector-python* /tmp

After using the above command, use sudo apt autoremove again and that will solve everything.

For more details about this issue, visit this site.

| improve this answer | |

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.