Using pkg-config to detect libraries installed using homebrew
2016-06-22 11:28
525 查看
http://flummox-engineering.blogspot.com/2015/01/osx-cmake-no-package-gnutls-found.html
If you are trying to link to a library installed via Homebrew, I suggest reading
this article.
Whilst trying to build OpenVAS on OSX, I encounter this message.
This is surprising because I have the latest version of GnuTLS installed viaHomebrew. pkg-config cannot find it though
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnutls' found
Add the pkg-config configuration file /usr/local/opt/gnutls/lib/pkgconfig/gnutls.pc to PKG_CONFIG_PATH and now pkg-config will be able to locate it
Not so fast! GNuTLS itself has a couple of dependencies. You can either install them:
Or in my case they had been installed, but not properly linked by homebrew:
Now pkg-config can locate the GnuTLS library and header files
JHBuild (wiki.archlinux.org)
Environment
Variables Considered Harmful for Your Secrets (movingfast.io)
Organizing
Your Clojure Environment and Logs with Leiningen (8thlight.com)
ModSecurity
Advanced Topic of the Week: Detecting Malware with Fuzzy Hashing (spiderlabs.com)
Environment
variables (rosettacode.org)
Blog
Post: [Script Of Dec. 16] How to check for duplicate paths in PATH environment variable (blogs.technet.com)
Uhhh,
I fucked up cmd (gbatemp.net)
PyCmd:
a smarter command line? (betanews.com)
Posted 9th January 2015 by Hanxue
Lee
Labels: automake cmake OSX
Using pkg-config to detect libraries installed using homebrew
If you are trying to link to a library installed via Homebrew, I suggest readingthis article.
Whilst trying to build OpenVAS on OSX, I encounter this message.
Package gnutls was not found in the pkg-config search path. Perhaps you should add the directory containing `gnutls.pc' to the PKG_CONFIG_PATH environment variable No package 'gnutls' found Package gnutls was not found in the pkg-config search path. Perhaps you should add the directory containing `gnutls.pc' to the PKG_CONFIG_PATH environment variable No package 'gnutls' found
This is surprising because I have the latest version of GnuTLS installed viaHomebrew. pkg-config cannot find it though
$ pkg-config --cflags gnutls
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnutls' found
Add the pkg-config configuration file /usr/local/opt/gnutls/lib/pkgconfig/gnutls.pc to PKG_CONFIG_PATH and now pkg-config will be able to locate it
$ PKG_CONFIG_PATH=/usr/local/opt/gnutls/lib/pkgconfig pkg-config --cflags gnutls Package libtasn1 was not found in the pkg-config search path. Perhaps you should add the directory containing `libtasn1.pc' to the PKG_CONFIG_PATH environment variable
Not so fast! GNuTLS itself has a couple of dependencies. You can either install them:
$ brew install libtasn1 p11-kit
Or in my case they had been installed, but not properly linked by homebrew:
$ brew link libtasn1 p11-kit
Now pkg-config can locate the GnuTLS library and header files
$ PKG_CONFIG_PATH=/usr/local/opt/gnutls/lib/pkgconfig pkg-config --cflags gnutls -I/usr/local/Cellar/gnutls/3.1.10/include -I/usr/local/Cellar/libtasn1/4.2/include -I/usr/local/Cellar/p11-kit/0.18.4/include/p11-kit-1
Related articles
JHBuild (wiki.archlinux.org)Environment
Variables Considered Harmful for Your Secrets (movingfast.io)
Organizing
Your Clojure Environment and Logs with Leiningen (8thlight.com)
ModSecurity
Advanced Topic of the Week: Detecting Malware with Fuzzy Hashing (spiderlabs.com)
Environment
variables (rosettacode.org)
Blog
Post: [Script Of Dec. 16] How to check for duplicate paths in PATH environment variable (blogs.technet.com)
Uhhh,
I fucked up cmd (gbatemp.net)
PyCmd:
a smarter command line? (betanews.com)
Posted 9th January 2015 by Hanxue
Lee
Labels: automake cmake OSX
相关文章推荐
- mybatis实战教程(mybatis in action),mybatis入门到精通
- 【6.24-AppCan移动开发大会倒计时】科大讯飞来了!
- Android 面试题
- android:maxLines与android:ellipsize冲突
- 基本数据类型的面向对象----包装类
- git提交大文件的解决方法
- eclipse中修改内存
- Flex隐藏TextInput的边框及背景
- 人脸关键点定位——读CLM有感
- ServiceManager入门
- GnuTLS and pkg-config
- DIV+CSS+jQ实现省市联动可扩展
- zepto,jquery关于cookie存放时间问题
- win7开发hadoop的一些问题
- 在Xcode中为main函数设置输入参数
- 在LINUX下面如何查看CPU的温度
- code3728 联合权值
- Github建站全攻略
- iOS上文本绘制的几种方法
- swift: if和guard以及携带let语句的使用说明