由于依赖性错误,无法安装Varnish

时间:2016-01-27 14:20:34

标签: varnish

我正在CentOS 6.7上尝试安装varnish并获得以下错误。有人可以帮忙吗?

yum install varnish

.....

Finished Dependency Resolution
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: systemd-units
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
           Requires: systemd-sysv
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

2 个答案:

答案 0 :(得分:2)

您需要从源代码安装清漆。请按照以下步骤操作:

https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source

首先下载tarball:

http://repo.varnish-cache.org/source/

然后安装列出的软件包:

yum install -y autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz

tar xzvf downloaded-filename.tar.gz
cd name-of-the-folder-from-tarball
sh autogen.sh
sh configure
make
make check
(go make some tea)
make install

阅读有关启动服务的说明:https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source

答案 1 :(得分:0)

我不允许发表评论,但我已经对上述答案进行了评论。我刚用它在Amazon Linux上安装Varnish 5.2。这种方法的缺点是你没有得到一个漂亮整洁的“sudo service varnish start”选项,但好处是至少你有Varnish 5。

上述答案的一个变化。源的位置已更改。你现在可以在这里找到它:

http://varnish-cache.org/releases/