编译安装varnish出错解决办法
本来是打算研究nginx+varnish的,没想到我居然在编译安装varnish的时候出错,想起以前研究varnish反向代理出现过相同的问题,所以解决起来很快,看来有时候解决过的问题还是要保存起来,免得下次忘了又去到处找.
系统:centos 5.5
软件:varnish-2.1.5.tar.gz
编译安装出现的错误:
configure: WARNING: xsltproc not found ?not building documentation
checking for rst2man... no
checking for rst2man.py... no
configure: WARNING: rst2man not found ?not building man pages
checking for clock_gettime in -lrt... yes
checking for dlopen in -ldl... yes
checking for library containing initscr... no
configure: WARNING: curses not found; some tools will not be built
checking for library containing pthread_create... -lpthread
checking for socket in -lsocket... no
checking for getaddrinfo in -lnsl... yes
checking for cos in -lm... yes
checking for pkg-config... no
checking for PCRE... no
configure: error: in `/root/varnish-2.1.5':
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables PCRE_CFLAGS
and PCRE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details
当出现上面的错误时,说明你没有安装pkgconfig,或者是你的环境变量有问题,环境变量有问题的可以自己去改下,没有安装的可以使用下面这条命令:
yum -y install automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig
因为有些服务商给装的是精简版的,所以会出现好多组件没有安装.好了,接下来就不用我说了.
评论: