小编bee*_*oop的帖子

如何链接从 Homebrew 安装的 mysql-client 与柴油 cli?

我一直在尝试使用 安装 Rust Diesel CLI 工具cargo install diesel_cli,但安装失败并出现链接错误

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

我安装使用自制的MySQL客户端:brew install mysql-client。在安装过程中,我收到以下警告:

mysql-client is keg-only, which means it was not symlinked into /usr/local,
because conflicts with mysql.
If you need to have mysql-client first in your PATH run:
  echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile
For compilers to find mysql-client you may need to set:
  export LDFLAGS="-L/usr/local/opt/mysql-client/lib"
  export CPPFLAGS="-I/usr/local/opt/mysql-client/include” …
Run Code Online (Sandbox Code Playgroud)

mysql macos linker-errors rust

1
推荐指数
1
解决办法
1850
查看次数

标签 统计

linker-errors ×1

macos ×1

mysql ×1

rust ×1