我想在一台全新的 FreeBSD 10 机器上安装 SaltStack。我遵循官方文档:http://docs.saltstack.com/en/latest/topics/installation/freebsd.html
但是当我尝试启动salt_master
守护进程时,它会失败并显示以下错误消息:
root@teldrassil:~ # service salt_master start
Starting salt_master.
Traceback (most recent call last):
File "/usr/local/bin/salt-master", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 2837, in <module>
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 449, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 742, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 639, in resolve
raise DistributionNotFound(req)
查看 FreshPorts 网站,它说 SaltStack 需要另外两个包/端口才能正常工作:
sysutils/py-halite
sysutils/py-salt-api
但即使安装了这两个端口,我在尝试启动时仍然遇到同样的错误salt_master
。
答案1
我今天在 FreeBSD 10 上使用 py-salt 2014.1.7 时遇到了同样的问题。我最终更新了我的端口树并运行make reinstall clean
。这允许 salt_master 守护进程启动。如果您还没有这样做,我建议您也这样做。
答案2
撰写本文时:
pkg update
pkg install py27-salt-2014.1.13
之后:
pkg update
pkg search salt
pkg install <package>
其中,包是遵循模式 py<version>-salt.<version> 的包(而不是 api 包);