ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
时间: 2023-06-16 07:04:55 浏览: 379
这个警告是因为在编译时没有找到 `/usr/local/opt/openssl/lib` 目录。这个目录是 OpenSSL 库的安装路径。如果你已经安装了 OpenSSL 库,但是编译时还是出现了这个警告,可以尝试添加 `-L/usr/local/opt/openssl/lib` 选项来指定 OpenSSL 库的路径。
如果你没有安装 OpenSSL 库,可以通过 Homebrew 等包管理器来安装:
```
brew install openssl
```
安装完成后,再次编译应该就不会出现这个警告了。
相关问题
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib' ld: library not found for -lzlib clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mysqlclient Running setup.py clean for mysqlclient Failed to build mysqlclient ERROR: Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
这个错误提示是在安装 `mysqlclient` 库时出现的。可以尝试以下几种方法解决:
1. 先安装 `zlib` 库
```
brew install zlib
```
2. 然后再安装 `mysqlclient`
```
pip install mysqlclient
```
3. 如果上述两种方法都无法解决问题,可以尝试使用 `conda` 安装 `mysqlclient` 库
```
conda install mysqlclient
```
希望能够帮到你!
阅读全文