如何在AlmaLinux 9.2上安装libmysqlclient-dev

如何在AlmaLinux 9.2上安装libmysqlclient-dev

我需要安装libmysqlclient-dev但得到No match for argument: libmysqlclient-dev Error: Unable to find a match: libmysqlclient-dev.

答案1

libmysqlclient-dev是 Debian 软件包名称。在 Almalinux 9 上,如果您需要 MySQL 开发文件,包括libmysqlclient.so头文件,请在库存没有任何外部存储库的系统,运行以下命令:

» dnf whatprovides /usr/include/mysql/mysql.h
mariadb-connector-c-devel-3.2.6-1.el9_0.i686 : Development files for mariadb-connector-c
Repo        : appstream
Matched from:
Filename    : /usr/include/mysql/mysql.h

mariadb-connector-c-devel-3.2.6-1.el9_0.x86_64 : Development files for mariadb-connector-c
Repo        : appstream
Matched from:
Filename    : /usr/include/mysql/mysql.h

这是该软件包的 32 位和 64 位版本包含的内容:

» dnf info mariadb-connector-c-devel
Last metadata expiration check: 1:32:10 ago on Tue Oct 10 08:12:55 2023.
Available Packages
Name         : mariadb-connector-c-devel
Version      : 3.2.6
Release      : 1.el9_0
Architecture : i686
Size         : 55 k
Source       : mariadb-connector-c-3.2.6-1.el9_0.src.rpm
Repository   : appstream
Summary      : Development files for mariadb-connector-c
URL          : http://mariadb.org/
License      : LGPLv2+
Description  : Development files for mariadb-connector-c.
             : Contains everything needed to build against libmariadb.so >=3 client library.

Name         : mariadb-connector-c-devel
Version      : 3.2.6
Release      : 1.el9_0
Architecture : x86_64
Size         : 55 k
Source       : mariadb-connector-c-3.2.6-1.el9_0.src.rpm
Repository   : appstream
Summary      : Development files for mariadb-connector-c
URL          : http://mariadb.org/
License      : LGPLv2+
Description  : Development files for mariadb-connector-c.
             : Contains everything needed to build against libmariadb.so >=3 client library.

只是为了说明,这是 64 位版本包含的内容:

» dnf repoquery -l mariadb-connector-c-devel.x86_64
Last metadata expiration check: 1:33:59 ago on Tue Oct 10 08:12:55 2023.
/usr/bin/mariadb_config
/usr/bin/mysql_config
/usr/include/mysql
/usr/include/mysql/errmsg.h
/usr/include/mysql/ma_list.h
/usr/include/mysql/ma_pvio.h
/usr/include/mysql/ma_tls.h
/usr/include/mysql/mariadb
/usr/include/mysql/mariadb/ma_io.h
/usr/include/mysql/mariadb_com.h
/usr/include/mysql/mariadb_ctype.h
/usr/include/mysql/mariadb_dyncol.h
/usr/include/mysql/mariadb_rpl.h
/usr/include/mysql/mariadb_stmt.h
/usr/include/mysql/mariadb_version-x86_64.h
/usr/include/mysql/mariadb_version.h
/usr/include/mysql/mysql
/usr/include/mysql/mysql.h
/usr/include/mysql/mysql/client_plugin.h
/usr/include/mysql/mysql/plugin_auth.h
/usr/include/mysql/mysql/plugin_auth_common.h
/usr/include/mysql/mysql_version.h
/usr/include/mysql/mysqld_error.h
/usr/lib/.build-id
/usr/lib/.build-id/e2
/usr/lib/.build-id/e2/3771d6e086f917cc047fbb24ef416eb66eea29
/usr/lib64/libmariadb.so
/usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient_r.so
/usr/lib64/pkgconfig/libmariadb.pc

安装它与dnf install mariadb-connector-c-devel.x86_64.

相关内容