Chinaunix首页 | 论坛 | 博客
  • 博客访问: 482063
  • 博文数量: 108
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1134
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-29 19:43
文章分类

全部博文(108)

文章存档

2016年(10)

2015年(9)

2014年(73)

2013年(16)

我的朋友

分类: LINUX

2014-04-28 15:32:30

在centos6.3上安装salt-minion。配置完minion后启动/etc/init.d/salt-minion start
报如下的错误

点击(此处)折叠或打开

  1. [root@cdn salt]# /etc/init.d/salt-minion start
  2. Starting salt-minion daemon: [ OK ]
  3. [root@cdn salt]# ps -ef|grep salt
  4. root 20613 1 2 15:26 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion -d
  5. root 20638 20613 5 15:26 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion -d
  6. root 20640 20460 0 15:26 pts/1 00:00:00 grep salt
  7. [root@cdn salt]# cd /var/log/salt/
  8. [root@cdn salt]# ll
  9. total 4
  10. -rw------- 1 root root 1134 Apr 28 15:26 minion
  11. [root@cdn salt]# tailf minion
  12.     self.minion = salt.minion.Minion(self.config)
  13.   File "/usr/lib/python2.6/site-packages/salt/minion.py", line 528, in __init__
  14.     self.authenticate(timeout, safe)
  15.   File "/usr/lib/python2.6/site-packages/salt/minion.py", line 1029, in authenticate
  16.     creds = auth.sign_in(timeout, safe)
  17.   File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 351, in sign_in
  18.     self.opts['master_uri'],
  19.   File "/usr/lib/python2.6/site-packages/salt/payload.py", line 159, in __init__
  20.     self.context = zmq.Context()
  21. NameError: global name 'zmq' is not defined
最后说没找到zmq。然后用python 查zmq的库文件是否在path里


点击(此处)折叠或打开

  1. [root@cdn /]# python
  2. Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
  3. [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import sys
  6. >>> print sys.path
  7. ['', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages']
  8. >>>


  9. [root@cdn /]# find . -name *zmq*
  10. ./var/lib/yum/yumdb/p/2d253855846b08d0bd26a0ef34a63e658553af26-python-zmq-2.2.0.1-1.el6-x86_64
  11. ./usr/share/doc/python-zmq-2.2.0.1
  12. ./usr/share/doc/python-zmq-2.2.0.1/examples/logger/zmqlogger.py
  13. ./usr/share/doc/python-zmq-2.2.0.1/examples/bench/pyzmq_client.py
  14. ./usr/share/doc/python-zmq-2.2.0.1/examples/bench/pyzmq_server.py
  15. ./usr/local/usr/local/include/zmq.h
  16. ./usr/local/usr/local/include/zmq_utils.h
  17. ./usr/local/usr/local/share/man/man7/zmq_ipc.7
  18. ./usr/local/usr/local/share/man/man7/zmq_curve.7
  19. ./usr/local/usr/local/share/man/man7/zmq_pgm.7
  20. ./usr/local/usr/local/share/man/man7/zmq_inproc.7
  21. ./usr/local/usr/local/share/man/man7/zmq_tcp.7
  22. ./usr/local/usr/local/share/man/man7/zmq_plain.7
  23. ./usr/local/usr/local/share/man/man7/zmq_epgm.7
  24. ./usr/local/usr/local/share/man/man7/zmq_null.7
  25. ./usr/local/usr/local/share/man/man7/zmq.7
  26. ./usr/local/usr/local/share/man/man3/zmq_unbind.3
  27. ./usr/local/usr/local/share/man/man3/zmq_disconnect.3
  28. ./usr/local/usr/local/share/man/man3/zmq_msg_recv.3
  29. ./usr/local/usr/local/share/man/man3/zmq_msg_init_size.3
  30. ./usr/local/usr/local/share/man/man3/zmq_ctx_destroy.3
  31. ./usr/local/usr/local/share/man/man3/zmq_msg_copy.3
  32. ./usr/local/usr/local/share/man/man3/zmq_bind.3
  33. ./usr/local/usr/local/share/man/man3/zmq_msg_move.3
  34. ./usr/local/usr/local/share/man/man3/zmq_term.3
  35. ./usr/local/usr/local/share/man/man3/zmq_ctx_set.3
  36. ./usr/local/usr/local/share/man/man3/zmq_connect.3
  37. ./usr/local/usr/local/share/man/man3/zmq_z85_decode.3
  38. ./usr/local/usr/local/share/man/man3/zmq_send_const.3
  39. ./usr/local/usr/local/share/man/man3/zmq_socket.3
  40. ./usr/local/usr/local/share/man/man3/zmq_errno.3
  41. ./usr/local/usr/local/share/man/man3/zmq_socket_monitor.3
  42. ./usr/local/usr/local/share/man/man3/zmq_getsockopt.3
  43. ./usr/local/usr/local/share/man/man3/zmq_msg_more.3
  44. ./usr/local/usr/local/share/man/man3/zmq_msg_init.3
  45. ./usr/local/usr/local/share/man/man3/zmq_send.3
  46. ./usr/local/usr/local/share/man/man3/zmq_msg_set.3
  47. ./usr/local/usr/local/share/man/man3/zmq_msg_data.3
  48. ./usr/local/usr/local/share/man/man3/zmq_msg_send.3
  49. ./usr/local/usr/local/share/man/man3/zmq_setsockopt.3
  50. ./usr/local/usr/local/share/man/man3/zmq_curve_keypair.3
  51. ./usr/local/usr/local/share/man/man3/zmq_ctx_new.3
  52. ./usr/local/usr/local/share/man/man3/zmq_sendmsg.3
  53. ./usr/local/usr/local/share/man/man3/zmq_msg_get.3
  54. ./usr/local/usr/local/share/man/man3/zmq_ctx_term.3
  55. ./usr/local/usr/local/share/man/man3/zmq_msg_init_data.3
  56. ./usr/local/usr/local/share/man/man3/zmq_init.3
  57. ./usr/local/usr/local/share/man/man3/zmq_ctx_get.3
  58. ./usr/local/usr/local/share/man/man3/zmq_z85_encode.3
  59. ./usr/local/usr/local/share/man/man3/zmq_close.3
  60. ./usr/local/usr/local/share/man/man3/zmq_version.3
  61. ./usr/local/usr/local/share/man/man3/zmq_msg_close.3
  62. ./usr/local/usr/local/share/man/man3/zmq_strerror.3
  63. ./usr/local/usr/local/share/man/man3/zmq_poll.3
  64. ./usr/local/usr/local/share/man/man3/zmq_msg_size.3
  65. ./usr/local/usr/local/share/man/man3/zmq_recvmsg.3
  66. ./usr/local/usr/local/share/man/man3/zmq_recv.3
  67. ./usr/local/usr/local/share/man/man3/zmq_proxy.3
  68. ./usr/local/usr/local/lib/libzmq.so.3.1.0
  69. ./usr/local/usr/local/lib/pkgconfig/libzmq.pc
  70. ./usr/local/usr/local/lib/libzmq.so.3
  71. ./usr/local/usr/local/lib/libzmq.la
  72. ./usr/local/usr/local/lib/libzmq.a
  73. ./usr/local/usr/local/lib/libzmq.so
  74. ./usr/lib64/python2.6/site-packages/zmq
  75. ./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.pyo
  76. ./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.pyc
  77. ./usr/lib64/python2.6/site-packages/zmq/web/zmqweb.py
  78. ./usr/lib64/python2.6/site-packages/zmq/core/libzmq.pxd
  79. ./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.pyc
  80. ./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.pyo
  81. ./usr/lib64/python2.6/site-packages/zmq/eventloop/zmqstream.py
  82. ./usr/lib64/python2.6/site-packages/zmq/utils/zmq_compat.h
  83. ./usr/lib64/python2.6/site-packages/pyzmq-2.2.0.1-py2.6.egg-info
  84. [root@cdn /]# python
从上面的输出看到zmq是在/usr/local/usr/local/lib/下。
那么我们需要在/usr/lib64下做个softlink 就可以,试下

点击(此处)折叠或打开

  1. lrwxrwxrwx 1 root root 36 Apr 28 15:31 libzmq.so.3 -> /usr/local/usr/local/lib/libzmq.so.3
  2. lrwxrwxrwx. 1 root root 25 Mar 11 13:29 libz.so -> ../../lib64/libz.so.1.2.3
  3. -rw-r--r--. 1 root root 1437 Jun 22 2012 logging.properties
  4. drwxr-xr-x. 3 root root 4096 Mar 11 13:29 lua
  5. -rw-r--r--. 1 root root 616 Jun 22 2012 Mcrt1.o
  6. drwxr-xr-x. 2 root root 4096 Mar 11 13:29 mysql
  7. drwxr-xr-x. 3 root root 4096 Mar 11 13:30 notification-daemon-1.0
  8. drwxr-xr-x. 4 root root 4096 Mar 11 13:30 nss
  9. drwxr-xr-x. 3 root root 4096 Mar 11 13:29 openssl
  10. drwxr-xr-x. 2 root root 4096 Mar 11 13:29 orbit-2.0
  11. drwxr-xr-x. 3 root root 4096 Mar 11 13:30 pango
  12. drwxr-xr-x. 42 root root 4096 Mar 11 13:31 perl5
  13. drwxr-xr-x. 2 root root 4096 Mar 11 13:31 pkgconfig
  14. drwxr-xr-x. 3 root root 4096 Mar 11 13:30 plymouth
  15. dr-xr-xr-x. 6 root root 4096 Mar 11 13:30 pm-utils
  16. drwxr-xr-x. 3 root root 4096 Mar 11 13:30 polkit-1
  17. drwxr-xr-x. 2 root root 4096 Nov 12 2010 ppl
  18. drwxr-xr-x. 3 root root 4096 Mar 11 13:29 pppd
  19. -rwxr-xr-x. 1 root root 40152 Nov 11 2010 preloadable_libintl.so
  20. drwxr-xr-x. 3 root root 4096 Mar 11 13:30 pygtk
  21. drwxr-xr-x. 23 root root 20480 Mar 11 13:30 python2.6
  22. drwxr-xr-x. 4 root root 4096 Mar 11 13:29 ruby
  23. drwxr-xr-x. 2 root root 4096 Mar 11 14:41 sa
  24. drwxr-xr-x. 2 root root 4096 Mar 11 13:31 sasl2
  25. -rw-r--r--. 1 root root 1696 Jun 22 2012 Scrt1.o
  26. drwxr-xr-x. 2 root root 4096 Mar 11 13:30 security
  27. dr-xr-xr-x. 2 root root 4096 Sep 23 2011 sse2
  28. drwxr-xr-x. 2 root root 4096 Mar 11 13:30 systemtap
  29. drwxr-xr-x. 2 root root 4096 Mar 11 13:29 tc
  30. dr-xr-xr-x. 2 root root 4096 Sep 23 2011 tls
  31. drwxr-xr-x. 3 root root 4096 Mar 11 13:31 wireshark
  32. dr-xr-xr-x. 2 root root 4096 Sep 23 2011 X11
  33. -rw-r--r--. 1 root root 200 Feb 22 2012 xml2Conf.sh
  34. -rw-r--r--. 1 root root 180 Nov 12 2010 xsltConf.sh
  35. [root@cdn lib64]# python
  36. Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
  37. [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
  38. Type "help", "copyright", "credits" or "license" for more information.
  39. >>> import zmq
  40. >>> quit
  41. Use quit() or Ctrl-D (i.e. EOF) to exit
  42. >>> quit()
  43. [root@cdn lib64]
测试ok那么我们可以启动minion了。
阅读(8945) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~