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 的相关包依赖路径注册到会话中,执行编译安装即可。

  • 相关阅读:
    团队冲刺个人总结第二天
    Gym
    Codeforces Round #162 (Div. 2) A~D 题解
    Wormholes 虫洞 BZOJ 1715 spfa判断负环
    修剪草坪 单调队列优化dp BZOJ2442
    没有上司的舞会 树形dp
    餐巾计划问题 费用流
    最小路径覆盖问题 最大流
    [JSOI2007]麻将 模拟 BZOJ1028
    CF702F T-Shirts FHQ Treap
  • 原文地址:https://www.cnblogs.com/weixinsb/p/15594366.html
Copyright © 2011-2022 走看看