[英]Run Salt minion specifying the Python path
有沒有辦法指定必須用於運行 salt-minion 的 python 解釋器?
我有幾個鹽奴才在本地網絡上運行。 它們中的大多數都正常工作,但有些 minion 會拋出錯誤,我們猜測 minion 正在運行 python 3 而不是 python 2 (我們需要使用salt-2018.3.4-py2
)
如果我運行python --version
它說版本是 3.7。 我們如何強制奴才使用 python 2.7?
謝謝。
我想說這直接取決於您的安裝 package。 如果您安裝了salt-2018.3.4-py2
,則意味着它將與 py2 一起運行。
在我的奴才上,安裝了 salt-2019.2-py3 並且我有
$ python -V
Python 2.7.13
$ salt-minion --versions
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.5.3 (default, Sep 27 2018, 17:25:39)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.9
locale: UTF-8
machine: x86_64
release: 4.9.0-9-amd64
system: Linux
version: debian 9.9
和
$ head -1 /usr/bin/salt-minion
#!/usr/bin/python3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.