无法安装 MySQLdb

无法安装 MySQLdb

我打算使用这些代码来安装它

$ sudo apt-get install python3-dev
$ sudo apt-get install libmysqlclient-dev
$ sudo apt-get install zlib1g-dev
$ sudo pip3 install mysqlclient

但是当尝试这个

$ sudo apt-get install libmysqlclient-dev

我收到这个错误

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-community-client-plugins (= 8.0.36-1ubuntu20.04) but it is not going to be installed                     Depends: libssl1.1 (>= 1.1.1) but 1.1.0g-2ubuntu4 is to be installed
 mysql-common : Conflicts: mysql-client-8.0 but 8.0.36-0ubuntu0.22.04.1 is to be installed 
                Conflicts: mysql-client-core-8.0 but 8.0.36-0ubuntu0.22.04.1 is to be installed
                Conflicts: mysql-server-8.0 but 8.0.36-0ubuntu0.22.04.1 is to be installed
                Conflicts: mysql-server-core-8.0 but 8.0.36-0ubuntu0.22.04.1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

相关内容