Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust 找不到_PQconnectiondb柴油锈_Rust_Apple M1_Rust Diesel - Fatal编程技术网

Rust 找不到_PQconnectiondb柴油锈

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

我用的是macm1。我已经成功安装了diesel客户端和postgres驱动程序(我可以在同一台笔记本电脑上使用sqlalchemy连接到postgres)。但是,每当我尝试运行rust diesel客户端时,都会出现以下错误:

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芯片

您需要提供一个包含此符号(和其他符号)的库。仅仅告诉链接器忽略未定义的符号并不能解决您的问题。这是否回答了您的问题?