使用 GNU 环境工具 MinGW 编译 Redis 时,提示找不到pkg-config命令,
0 1 2 |
... /bin/sh: pkg-config: command not found ... |
于是就开始就开始安装pkg-config,可是在安装pkg-config时./configure报错,如下:
0 1 2 3 4 |
... checking if internal glib should be used... no checking for pkg-config... no checking for glib-2.0 >= 2.16... no configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure to use the bundled copy. |
原因是minGW默认没有安装glib,那么在下载的pkg-config-0.29.2.tar.gz中就存在glib包
解决办法:
0 |
./configure --with-internal-glib |
使用压缩包自带的glib