Rust 找不到_PQconnectiondb柴油锈
我用的是macm1。我已经成功安装了diesel客户端和postgres驱动程序(我可以在同一台笔记本电脑上使用sqlalchemy连接到postgres)。但是,每当我尝试运行rust diesel客户端时,都会出现以下错误:Rust 找不到_PQconnectiondb柴油锈,rust,apple-m1,rust-diesel,Rust,Apple M1,Rust Diesel,我用的是macm1。我已经成功安装了diesel客户端和postgres驱动程序(我可以在同一台笔记本电脑上使用sqlalchemy连接到postgres)。但是,每当我尝试运行rust diesel客户端时,都会出现以下错误: dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb Referenced from: /Users/maxwellflitton/.cargo/bin/diesel Expected
dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb
Referenced from: /Users/maxwellflitton/.cargo/bin/diesel
Expected in: flat namespace
dyld: Symbol not found: _PQconnectdb
Referenced from: /Users/maxwellflitton/.cargo/bin/diesel
Expected in: flat namespace
zsh: abort
我在/Users/maxwellflitton/.cargo/config
的配置文件中有以下配置,内容如下:
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
我有以下配置:
- 锈蚀:rustc 1.51.0(2fd73fabe 2021-03-23)
- 柴油机:
{version=“1.4.4”,功能=[“postgres”]}
- 数据库:postgres
- 操作系统:MacOs Big Sur 11.2.3 M1芯片