- 源代码地址:https://github.com/google/snappy
下载 git clone https://github.com/google/snappy - 编译
- 进入snappy源代码文件夹,运行命令: ./autogen.sh
报错 “./autogen.sh: line 3: aclocal: command not found”
通过http://superuser.com/questions/657925/cygwin-rtorrent-installing-libtorrent-autogen-sh-aclocal-not-found这篇文章得知,系统没有安装automake,
运行命令: breaw install automake
报错“-bash: brew: command not found”
安装 brew
运行 命令:ruby -e "$(curl -f sSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
然后 安装 automake,运行命令: brew install automake
运行命令:./autogen.sh
报错:“./autogen.sh: line 5: libtoolize: command not found”
安装 libtool。运行命令:brew install libtool
继续运行命令:./autogen.sh
报错“./autogen.sh: line 5: libtoolize: command not found”
通过这篇文章:http://stackoverflow.com/questions/15448582/installed-libtool-but-libtoolize-not-found
我是在改动./autogen.sh 把第五行改成glibtoolize --copy
网上也有这样改得(我没试):
- 进入snappy源代码文件夹,运行命令: ./autogen.sh
case `uname` in Darwin*) glibtoolize --copy ;;
*) libtoolize --copy ;; esac
运行命令:./autogen.sh
报错:“configure.ac:42: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:44: error: possibly undefined macro: AC_MSG_FAILURE”
通过这篇文章http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error
我安装了pkgconfig,运行命令:brew install pkgconfig
报错“rm: autom4te.cache/output.0: Permission denied
rm: autom4te.cache/output.1: Permission denied
rm: autom4te.cache/requests: Permission denied
rm: autom4te.cache/traces.0: Permission denied
rm: autom4te.cache/traces.1: Permission denied
rm: autom4te.cache: Directory not empty
”
改成sudo ,运行命令:sudo ./autogen.sh
- 运行configure ,运行命令:./configure
- 运行make。运行命令:make
- 运行make install,运行命令:make install
3. 验证