我尝试过"apt-get install python-mysqldb"命令,结果如下:
注意:"apt-get install python3-mysqldb" 可以工作,但是我有很多用于 Python 2.x 的代码不再运行,这引起了足够的问题,可能需要重新安装 Ubuntu 18.04。
root@ps1svr:~# apt-get install python-mysqldb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-mysqldb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-mysqldb' has no installation candidate
注意:"apt-get install python3-mysqldb" 可以工作,但是我有很多用于 Python 2.x 的代码不再运行,这引起了足够的问题,可能需要重新安装 Ubuntu 18.04。