美文网首页程序员
Package was not found in the pkg

Package was not found in the pkg

作者: DeanWang | 来源:发表于2016-01-25 09:52 被阅读869次

    周末跑个以前的项目,原本好好的makefile报错,

    Package opencv was not found in the pkg-config search path.

    Perhaps you should add the directory containing `opencv.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'opencv' found

    一顿查资料,最后brew doctor提示:

    You have a non-Homebrew 'pkg-config' in your PATH:

    /opt/local/bin/pkg-config

    注意/opt/local/bin/, 这是mac-port的目录,上次忘了为什么装了个mac-port,导致pkg-config冲突

    解决就很简单了;

    echo $PATH 看下路径;  

    vi ~/.bash_profile 查下确保/usr/local/bin/ 目录在/opt/local/bin之前即可。

    相关文章

      网友评论

        本文标题:Package was not found in the pkg

        本文链接:https://www.haomeiwen.com/subject/kjarkttx.html