Bash “如何修复”;缺少一些pkg配置宏“;错误?

Bash “如何修复”;缺少一些pkg配置宏“;错误?,bash,installation,zeromq,Bash,Installation,Zeromq,我正在尝试在OS X 10.11.2上安装zeromq。为此,建议使用以下shell命令: cd libzmq ./autogen.sh && configure && make -j 4 但是当我进入第二行时,我得到以下错误: configure.ac:59: error: missing some pkg-config macros (pkg-config package) If this token and others are legitimate,

我正在尝试在OS X 10.11.2上安装zeromq。为此,建议使用以下shell命令:

cd libzmq
./autogen.sh && configure && make -j 4
但是当我进入第二行时,我得到以下错误:

configure.ac:59: error: missing some pkg-config macros (pkg-config package)
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:68: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:69: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:253: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:427: error: missing some pkg-config macros (pkg-config package)
configure:6315: error: possibly undefined macro: AC_DISABLE_STATIC
configure:6319: error: possibly undefined macro: AC_ENABLE_STATIC
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
autogen.sh: error: autoreconf exited with status 0

如何修复此问题并成功安装zeromq?

我也遇到了同样的问题。安装pkg配置

apt-get install pkg-config

首先,不要手动安装任何东西。这会将非托管库和头添加到文件系统中,将来会遇到很多问题。改用自制软件

brew install zeromq
如果您真的想手动编译和安装它-您缺少pkg config,它本身必须安装-通过自制或手动编译

cd /tmp
curl -OL https://pkg-config.freedesktop.org/releases/pkg-config-0.29.1.tar.gz
tar xzvf pkg-config-0.29.1.tar.gz
cd pkg-config-0.29.1
./configure --with-internal-glib
make
sudo make install