我正在尝试在 CentOS 7 上安装 Varnish 4。
我首先添加了这些 rpm:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm
sudo rpm -iUvh http://195.220.108.108/linux/centos/7.0.1406/extras/x86_64/Packages/epel-release-7-2.noarch.rpm
yum install varnish
但我明白这一点:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.team-cymru.org
* epel: mirror.steadfast.net
* extras: mirror.team-cymru.org
* updates: mirror.team-cymru.org
Resolving Dependencies
--> Running transaction check
---> Package varnish.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: varnish-libs = 4.0.2-1.el6 for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.3)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.2)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.0)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.1)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvcc.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishcompat.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnish.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvgz.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Running transaction check
---> Package varnish.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-4.0.2-1.el6.x86_64
---> Package varnish-libs.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-libs-4.0.2-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
Requires: libpcre.so.0()(64bit)
Available: varnish-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.0-1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.1-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-4.0.1-2.el7.x86_64 (epel)
Not found
Installing: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-libs-4.0.1-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-libs-4.0.1-2.el7.x86_64 (epel)
Not found
Installing: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
Not found
Error: Package: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
Requires: libpcre.so.0()(64bit)
Available: varnish-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.0-1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-libs-4.0.0-1.el6.x86_64 (varnish-4.0)
libpcre.so.0()(64bit)
Available: varnish-4.0.1-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-4.0.1-2.el7.x86_64 (epel)
Not found
Installing: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-libs-4.0.1-1.el6.x86_64 (varnish-4.0)
Not found
Available: varnish-libs-4.0.1-2.el7.x86_64 (epel)
Not found
Installing: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
我不知道你遵循的是谁的指示,但这些指示要么是错误的,要么就是错误的指示。
在干净的 CentOS 7 系统上,您可以通过以下方式安装 Varnish 4:
yum install epel-release
yum install varnish
由于您的系统不再干净,您必须先清理它。特别是:
您安装了
jemalloc
EL6 的软件包。您需要将其替换为 EL7 的软件包。由于您已经安装了 EPEL 存储库,因此只需执行以下操作即可:yum update jemalloc
否则,只需删除并重新安装它。
rpm --nodeps -e jemalloc yum install jemalloc
你安装了一个名为的存储库
varnish-4.0
(可能是Varnish 社区) 但您没有提到这一点。您需要删除它,因为 (a) 它仅适用于 EL6,并且 (b) EPEL 已经发布了 Varnish 4。rpm --nodeps -e $(rpm -qf /etc/yum.repos.d/varnish*.repo)
最后,您的系统应该是干净的,您可以安装 Varnish。
yum install varnish
最后说明:EPEL Varnish 将落后于上游 Varnish 点发布,原因是EPEL 的企业 QA 要求。如果跟踪点发布对你来说很重要,你可能希望参与质量保证流程在 EPEL 中查找此软件包。这通常涉及构建或安装测试软件包,然后投票赞成或反对根据它是否有效。(例如,在撰写本文时,Varnish 4.0.2 是最新上游,它还需要 3 个赞成票才能在 EPEL 中升级为稳定版本。)