zoukankan      html  css  js  c++  java
  • No package 'openssl' found / Package 'libssl', required by 'openssl', not found

    No package 'openssl' found / Package 'libssl', required by 'openssl', not found

    错误

    - No package 'openssl' found
    
    - Package 'libssl', required by 'openssl', not found

    提示

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables OPENSSL_CFLAGS
    and OPENSSL_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    mac 下安装某些依赖 openssl 的依赖时,可能会遇到上面两个错误,首先确认是否已经安装了 openssl version / brew info openssl,如果未安装,brew install openssl

    1、补充 PKG_CONFIG_PATH 路径

    # ~/.bash_profile
    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
    export PKG_CONFIG_PATH

    2、注册 openssl 到 pkgconfig 中

    # 查看 openssl 是否在 pkgconfig 中
    pkg-config --list-all | grep openssl
    
    # 如果 pkgconfig 中没有 openssl 包 则手动建立 或者 尝试 brew unlink/link 重建
    cd /usr/local/Cellar/openssl@1.1/1.1.1d/lib/pkgconfig
    ln -s `pwd`/openssl.pc /usr/local/lib/pkgconfig

    3、声明 openssl lib/include 的路径

    export OPENSSL_LIBS="-L/usr/local/Cellar/openssl@1.1/1.1.1d/lib"
    export OPENSSL_CFLAGS="-I/usr/local/Cellar/openssl@1.1/1.1.1d/include"

    以上三步,就可以将 openssl 的相关包依赖路径注册到会话中,执行编译安装即可。

  • 相关阅读:
    ThroughRain第一次冲刺个人总结
    【操作系统】实验四 主存空间的分配和回收
    学习回顾与总结
    关于学术诚信与职业道德的承诺
    sprint个人总结+读书博客
    实验三 进程调度模拟程序
    团队项目3.0
    软件改进
    团队项目项目:二次开发
    作业调度
  • 原文地址:https://www.cnblogs.com/weixinsb/p/15594366.html
Copyright © 2011-2022 走看看