我的 Java Sir 告诉我安装 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命令,但它也没有工作,它给我带来了和上面一样的错误。
该怎么办?我在这里陷入困境!由于在“mysql-utilities”中完成的任何新开发都可以追溯到 2017 年 1 月 17 日,我认为我不再需要它了。我在尝试安装旧的存档 deb 包时犯了错误。(新手)
如果你知道如何删除它,它是什么,告诉我它真的很有帮助。
通常,
sudo apt autoremove
应该可以工作,但在这种情况下,我使用此命令解决了同样的问题:使用上述命令后,
sudo apt autoremove
再次使用即可解决所有问题。有关此问题的更多详细信息,请访问此站点。