这是我收到的错误:
configure.ac:105: error: possibly undefined macro: AC_SEARCH_LIBS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
autoreconf failed
该网站称:
如果收到“未定义的宏:AC_SEARCH_LIBS”之类的错误,请运行以下命令:echo $(brew --prefix)/share/aclocal | sudo tee -a /usr/share/aclocal/dirlist
即使我以 root 身份运行了该命令,结果仍然相同。这是该命令的结果:
/usr/local/share/aclocal
我认为 /usr/share/aclocal/dirlist 的权限应该没有问题:
$ ls -lah /usr/share/aclocal
total 8
drwxr-xr-x 5 root wheel 170B May 6 20:20 .
drwxr-xr-x 69 root wheel 2.3K Mar 12 03:18 ..
-rw-r--r-- 1 root wheel 69B May 6 20:54 dirlist
-rw-r--r-- 1 root wheel 7.7K Mar 3 20:57 libxml.m4
-rw-r--r-- 1 root wheel 7.9K Mar 3 20:57 libxslt.m4
aclocal
,automake
并且autoconf
全部都在/usr/local/bin/
,我尝试过通过安装它们homebrew
,我也尝试过自己编译和安装它们。我总是得到相同的结果。
帮忙?
答案1
升级 OS X 后我遇到了这个问题。已修复:brew reinstall pkg-config
答案2
对于那些在 Mac 上使用以下方法遇到此问题的人苹果端口而不是自制建议运行:
echo $(brew --prefix)/share/aclocal | sudo tee -a /usr/share/aclocal/dirlist
具有以下等价形式:
确保这件事/usr/share/aclocal/目录列表包含行/opt/local/share/aclocal(这是 macports 放置宏的地方):
echo "/opt/local/share/aclocal" | sudo tee -a /usr/share/aclocal/dirlist