我的Java先生告诉我安装 MySQL服务器,工作台和连接器。我花了30多个小时阅读不同的帖子,然后才以某种方式做到了。
启动Workbench之后,我去了Tools> Start Shell for MySQL Utilities。这给了我这个弹出窗口:https://imgur.com/GQvHKsI
按下“下载”选项将我重定向到此网站:https://imgur.com/ETr2nrY
安装此软件包后,每当我运行:sudo apt update时,都会出现此错误:
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:
mysql-connector-python
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:
mysql-connector-python
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以,我想我应该卸载它,然后我使用了sudo apt-get remove --purge mysql-connector-python命令,但是它也没有起作用,并且抛出了与上述相同的错误。
该怎么办?我在这里处于困境!
如果您知道如何删除它,它是什么,告诉我有关它真的很有帮助。
答案 0 :(得分:2)
通常,sudo apt autoremove
应该可以使用,但是在这种情况下,我使用此命令解决了相同的问题:
sudo mv /var/lib/dpkg/info/mysql-connector-python* /tmp
使用上述命令后,再次使用sudo apt autoremove
,这将解决所有问题。
有关此问题的更多详细信息,请访问this网站。