gpt4 book ai didi

mysql - 在 mac OS 中安装 mysqlclient 库

转载 作者:行者123 更新时间:2023-11-29 01:19:41 28 4
gpt4 key购买 nike

我正在尝试使用 diesel.rs 演示 Rust 数据库程序图书馆。

我正在执行入门步骤 here .

如本页所述,我在运行命令 cargo install diesel_cli 时遇到以下错误。

note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方案在下一步以及如下同一页面中给出。

   You can resolve this issue by either installing the library (using the usual way to do this depending on your operating system) or by specifying the backends you want to install the CLI tool with.

但我不知道如何在我的 mac 操作系统中执行此操作。我尝试了以下命令。

brew install mysqlclient
brew install lmysqlclient

但是 brew 找不到任何这样的 repo。请帮助我如何解决此错误并在我的 mac 操作系统中安装 mysqlclient 库。

最佳答案

mysql-connector-c似乎是您正在寻找的自制程序包。安装 mysql 时还应安装 Libmysqlclient酿造包。

关于mysql - 在 mac OS 中安装 mysqlclient 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49569724/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com