mac 下编译driftnet,提示找不到lib gtk-2.x,请高手协助解决,谢谢

tomorrow619810 2019-10-17 08:56:40
driftnet 不提供下载了,需要自己去拉代码编译

git地址: https://github.com/deiv/driftnet.git

参考的文档: https://www.ohlinge.cn/web/mac_os_driftent.html

组件都已安装好了,
在执行编译时:
./configure

./configure
checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... rm: conftest.dSYM: is a directory
yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking pkg-config is at least version 0.9.0... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for pcap_open_live in -lpcap... yes
checking for pthread_create in -lpthread... yes
checking for g_free in -lglib-2.0... yes
checking for g_signal_connect_data in -lgobject-2.0... yes
checking for gtk_main in -lgtk-x11-2.0... no
configure: error: cannot find lib gtk-2.x

提示找不到 gtk的包


我已尝试解决:
1.我本机的gtk+-2.0.pc 在目录/usr/local/lib/pkgconfig中
已配置至环境变量

export PKG_CONFIG=/usr/local/bin/pkg-config
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/Cellar/cairo/1.16.0_2/lib/pkgconfig:/usr/local/lib/pkgconfig

还是提示找不到gtk-2.x, 第一次编译c语言,请高手协助下,谢谢

...全文
256 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧