安装好salt-master和salt-minion之后,发现无法启动服务。
使用systemctl status salt-master命令查看,提示报错:
ImportError: cannot import name EscapeFormatter
Linux系统版本是:
# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
salt-master的版本是:
# yum info salt-master
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name : salt-master
Arch : noarch
Version : 3000.9
Release : 1.el7
Size : 3.0 M
Repo : installed
From repo : salt-latest
Summary : Management component for salt, a parallel remote execution system
URL : http://saltstack.org/
License : ASL 2.0
Description : The Salt master is the central server to which all minions connect.
解决方法:
# pip install --upgrade pip
# pip uninstall markupsafe
# pip install markupsafe
检验结果:
# python
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from markupsafe import EscapeFormatter
>>>