No module named cobbler.cli

先说我的环境:
[root@master ~]$  lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.10 (Final)
Release:        5.10
Codename:       Final
总之是CentOS5.1,64位
问题是这样子的,在CentOS5.1中安装cobbler,但是有一步出现以下问题:
[root@master ~]# cobbler get-loaders
Traceback (most recent call last):
  File "/usr/bin/cobbler", line 17, in
    import cobbler.cli as app
ImportError: No module named cobbler.cli
[root@master cobbler]# head -n 1 /usr/bin/yum
#!/usr/bin/python2
修改为一下即可:
#!/usr/bin/python2.4
分析:
CentOS默认的python版本是2.4的,我安装了python2.6的版本,将其默认的指定为2.4即可。
这个问题折腾了虽然时间补偿,但是如果提示是这样问题的,一般多是python惹的祸。

你可能感兴趣的:(CentOS)