2016-04-01 114 views
2

我想在OS X 10.11.2上安裝zeromq。要做到這一點,下面的shell命令被提出:如何解決「缺少一些pkg-config宏」錯誤?

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?

回答

2

我有同樣的問題。安裝pkg-config

apt-get install pkg-config 
1

首先,不要手動安裝任何東西。這會將非託管庫和標頭添加到文件系統中,您將來會遇到很多問題。使用自制軟件,而不是

brew install zeromq 

如果你真的想編譯並手動安裝 - 你缺少pkg配置,其本身必須安裝 - 無論是通過自制軟件,或通過手動編譯它。

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