我已经尝试了好几个小时来安装用于Postgres的cargo crate diesel_cli
。但是,每次我运行推荐的cargo命令时:
cargo install diesel_cli --no-default-features --features postgres
我等了几分钟,只是为了看到同样的构建失败并显示以下消息:
note: LINK : fatal error LNK1181: cannot open input file 'libpq.lib'
error: aborting due to previous error
error: failed to compile `diesel_cli v1.4.1`, intermediate artifacts can be found at `C:\Users\<user name here>\AppData\Local\Temp\cargo-installUU2DtT`
Caused by:
could not compile `diesel_cli`.
我正在Docker容器中运行Postgres,在我的C:\pgsql
上有二进制文件,同时lib
和bin
目录都在PATH
上,所以我无法弄清楚为什么它没有链接。文档中没有提到需要什么其他内容,还需要什么?
PATH
中还是放在了系统变量中的PATH
中? - MindSwipe