![尝试在 centos 上安装 puppet 3.8](https://linux22.com/image/686319/%E5%B0%9D%E8%AF%95%E5%9C%A8%20centos%20%E4%B8%8A%E5%AE%89%E8%A3%85%20puppet%203.8.png)
我正在尝试安装旧版本的 Puppet,
1)我安装了 puppet-devel repo 2)我执行了 yum update 然后运行 yum install puppet --skip-broken 我收到以下错误:
Packages skipped because of dependency problems:
1:facter-2.0.1-0.1rc4.el6.x86_64 from puppetlabs-devel
hiera-1.3.2-0.1rc2.el6.noarch from puppetlabs-devel
libselinux-ruby-2.2.2-6.el7.x86_64 from base
puppet-3.6.0-0.1rc1.el6.noarch from puppetlabs-devel
ruby-2.0.0.598-25.el7_1.x86_64 from base
因此我设法安装了大部分依赖项,但是在尝试安装 Puppet 时仍然出现错误:
repository 'puppetlabs-devel': Error parsing config: Error parsing "baseurl = 'https://yum.puppetlabs.com/<%= @dist.downcase -%>/<%= @codename -%>/devel/x86_64'": URL must be http, ftp, file or https not ""
.....我确实篡改了 repo,所以我会将 repo 输出放在这里:
[root@localhost bin]# cat /etc/yum.repos.d/puppetlabs-devel.repo
[puppetlabs-devel]
name=Puppet Labs Devel 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/devel/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-devel
enabled=1
gpgcheck=1
请告诉我您是否可以指出我所需版本的正确存储库。文档建议我使用 yum.puppetlabs.com,但我不确定该怎么做,因为我尝试了 rpm 方法,但没有成功
答案1
您提供的错误与您粘贴的 repo 配置不匹配 - 该错误表明您有一些puppetlabs-devel
包含一些 ERB(<%
等等)的其他定义。
我建议更彻底地搜索 /etc/yum.conf 和 /etc/yum.repos.d/ 并删除存储库的任何其他实例(grep -r puppetlabs-devel /etc/yum*
)。
您还应该使用非开发仓库,因为开发仓库仅包含候选版本和预发布软件。请使用以下说明4.0 之前的开源存储库进行配置。
答案2
我设法通过下载正确的 devel repo 并启用依赖项的 repo 来解决这个问题,devel repo 具有以下内容:
[root@localhost ~]# cat /etc/yum.repos.d/puppetlabs-devel.repo
[puppetlabs-devel]
name=Puppet Labs Devel 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/7/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-devel
enabled=1
gpgcheck=1
[puppetlabs-devel-dep]
name=Puppet Labs Devel 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/7/dependencies/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-devel
enabled=1
gpgcheck=1