MariaDB 连接器/C 未安装

我运行 Ubuntu 22.04.1 并安装了

apt install mariadb-client
apt install python-is-python3
apt install python3-pip


pip3 install mariadb


testdns:~ # pip3 install mariadb
Collecting mariadb
  Using cached (97 kB)
  Preparing metadata ( error
  error: subprocess-exited-with-error
  × python egg_info did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      /bin/sh: 1: mariadb_config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-qky_da14/mariadb_e832618ff3c74f408e9a89ba04e06286/", line 27, in <module>
          cfg = get_config(options)
        File "/tmp/pip-install-qky_da14/mariadb_e832618ff3c74f408e9a89ba04e06286/", line 62, in get_config
          cc_version = mariadb_config(config_prg, "cc_version")
        File "/tmp/pip-install-qky_da14/mariadb_e832618ff3c74f408e9a89ba04e06286/", line 28, in mariadb_config
          raise EnvironmentError(
      OSError: mariadb_config not found.
      This error typically indicates that MariaDB Connector/C, a dependency which
      must be preinstalled, is not found.
      If MariaDB Connector/C is not installed, see installation instructions
      If MariaDB Connector/C is installed, either set the environment variable
      MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the
       'mariadb_config' option to the file location of the mariadb_config utility.
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.


10.29.2022, 05:52
0 答案