启动targetcli时遭遇ImportError: cannot import name ALUATargetPortGroup故障
2017-10-23 19:03
686 查看
targetcli是一个iSCSI配置管理工具,该工具简单易用,可以直接替换scsi-target-utils。满心欢喜的装上它,正准备一睹为快,就杯具了。报错ImportError: cannot import name ALUATargetPortGroup。下面就这针对这个错误的解决方案。
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
一、故障现象
当前环境 [root@centos7-router ~]# more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 安装targetcli工具包 # yum install targetcli 故障现象 [root@centos7-router ~]# targetcli Traceback (most recent call last): File "/usr/bin/targetcli", line 24, in <module> from targetcli import UIRoot ### Author : Leshami File "/usr/lib/python2.7/site-packages/targetcli/__init__.py", line 18, in <module> from .ui_root import UIRoot ### Blog : http://blog.csdn.net/leshami File "/usr/lib/python2.7/site-packages/targetcli/ui_root.py", line 30, in <module> from .ui_backstore import complete_path, UIBackstores File "/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py", line 29, in <module> from rtslib_fb import ALUATargetPortGroup ImportError: cannot import name ALUATargetPortGroup1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
二、解决方案
从上面的错误提示可知,python文件有问题。于是验证一下python是否已正确安装 [root@centos7-router ~]# python Python 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> python可以正常工作,继续google,原来是缺少python-rtslib这个包。 [root@centos7-router ~]# yum install python-rtslib -y 再次执行成功 [root@centos7-router ~]# targetcli targetcli shell version 2.1.fb46 Copyright 2011-2013 by Datera, Inc and others. For help on commands, type 'help'. /> help GENERALITIES ============ This is a shell in which you can create, delete and configure configuration objects. The available commands depend on the current path or target path you want to run a command in: different path have different sets of available commands, i.e. a path pointing at an iscsi target will not have the same availaible commands as, say, a path pointing at a storage object. The prompt that starts each command line indicates your current path. Alternatively (useful if the prompt displays an abbreviated path to save space), you can run the pwd command to display the complete current path. Navigating the tree is done using the cd command. Without any argument, cd will present you wil the full objects tree. Just use arrows to select the destination path, and enter will get you there. Please try help cd for navigation tips. COMMAND SYNTAX ============== Commands are built using the following syntax: [TARGET_PATH] COMMAND_NAME [OPTIONS] The TARGET_PATH indicates the path to run the command from. If ommited, the command will be run from your current path. The OPTIONS depend on the command. Please use help COMMAND to get more information. AVAILABLE COMMANDS ================== The following commands are available in the current path: - bookmarks action [bookmark] - cd [path] - clearconfig [confirm] - exit - get [group] [parameter...] - help [topic] - ls [path] [depth] - pwd - refresh - restoreconfig [savefile] [clear_existing] - saveconfig [savefile] - sessions [action] [sid] - set [group] [parameter=value...] - status
- version
http://www.chengshiluntan.com/6917210-1.html http://www.chengshiluntan.com/6917406-1.html http://www.chengshiluntan.com/6917415-1.html http://www.chengshiluntan.com/6917442-1.html http://www.chengshiluntan.com/6917466-1.html http://www.chengshiluntan.com/6917478-1.html http://www.chengshiluntan.com/6917498-1.html http://www.chengshiluntan.com/6917537-1.html http://www.chengshiluntan.com/6917590-1.html http://www.chengshiluntan.com/6917604-1.html http://baijiahao.baidu.com/builder/preview/s?id=1582026938020897352 http://baijiahao.baidu.com/builder/preview/s?id=1582039159015647408 http://baijiahao.baidu.com/builder/preview/s?id=1582039360113121208 http://baijiahao.baidu.com/builder/preview/s?id=1582039573322455310 http://baijiahao.baidu.com/builder/preview/s?id=1582039718004335961 http://baijiahao.baidu.com/builder/preview/s?id=1582039909318708132 http://www.19lou.com/board-73061508556280516-thread-76581508739143051-1.htm https://www.wang1314.com/doc/topic-6657294-1.html https://www.wang1314.com/doc/topic-6658374-1.html https://www.wang1314.com/doc/topic-6658633-1.html https://www.wang1314.com/doc/topic-6658924-1.html https://www.wang1314.com/doc/topic-6659557-1.html https://www.wang1314.com/doc/topic-6659680-1.html https://www.wang1314.com/doc/topic-6659864-1.html https://www.wang1314.com/doc/topic-6660005-1.html https://www.wang1314.com/doc/topic-6660666-1.html https://www.wang1314.com/doc/topic-6609646-1.html http://www.51sole.com/b2b/sides126186361.html http://www.51sole.com/b2b/sides126186624.html http://www.51sole.com/b2b/sides126186686.html http://www.51sole.com/b2b/sides126186772.html http://www.51sole.com/b2b/sides126187022.html http://www.51sole.com/b2b/sides126187055.html http://www.51sole.com/b2b/sides126187096.html http://www.51sole.com/b2b/sides126187127.html http://www.51sole.com/b2b/sides126187238.html http://www.51sole.com/b2b/sides126187266.html http://blog.sina.com.cn/s/blog_17baa4f330102wxv6.html http://blog.sina.com.cn/s/blog_17baa4f330102wxv9.html http://blog.sina.com.cn/s/blog_17baa4f330102wxva.html http://blog.sina.com.cn/s/blog_17baa4f330102wxvb.html http://blog.sina.com.cn/s/blog_17baa4f330102wxvd.html http://blog.sina.com.cn/s/blog_17b5382a20102xthd.html http://blog.sina.com.cn/s/blog_17b5382a20102xthi.html http://blog.sina.com.cn/s/blog_17b5382a20102xthl.html http://blog.sina.com.cn/s/blog_17b5382a20102xthn.html http://blog.sina.com.cn/s/blog_17b5382a20102xthp.html http://groups.tianya.cn/post-224172-51ccfde5bf8e4da393a9474a082b7c74-1.shtml https://club.1688.com/article/63153589.html https://club.1688.com/article/63153762.html https://club.1688.com/article/63154090.html https://tieba.baidu.com/p/5386469825 https://tieba.baidu.com/p/5386471541 https://tieba.baidu.com/p/5386475851 https://tieba.baidu.com/p/5386482872 https://tieba.baidu.com/p/5386484224 https://tieba.baidu.com/p/5386490335 https://tieba.baidu.com/p/5386491309 http://www.chengshiluntan.com/6915808-1.html http://www.chengshiluntan.com/6915825-1.html http://www.chengshiluntan.com/6915841-1.html http://www.chengshiluntan.com/6915852-1.html http://www.chengshiluntan.com/6915856-1.html http://www.chengshiluntan.com/6915865-1.html http://www.chengshiluntan.com/6915871-1.html http://www.chengshiluntan.com/6915876-1.html http://www.chengshiluntan.com/6915878-1.html http://www.chengshiluntan.com/6915882-1.html https://www.wang1314.com/doc/topic-6606626-1.html https://www.wang1314.com/doc/topic-6606845-1.html https://www.wang1314.com/doc/topic-6607270-1.html https://www.wang1314.com/doc/topic-6607756-1.html https://www.wang1314.com/doc/topic-6607841-1.html https://www.wang1314.com/doc/topic-6608214-1.html https://www.wang1314.com/doc/topic-6608745-1.html https://www.wang1314.com/doc/topic-6609028-1.html https://www.wang1314.com/doc/topic-6609303-1.html https://www.wang1314.com/doc/topic-6609646-1.html http://www.19lou.com/board-49041508472050881-thread-48631508640211455-1.html https://buluo.qq.com/p/detail.html?bid=329211&pid=1242779-1508657617 http://blog.csdn.net/wonderfulwyq991/article/details/78310152 http://blog.csdn.net/sprite12io12/article/details/78310178 http://blog.sina.com.cn/s/blog_17b5382a20102xtg9.html http://blog.sina.com.cn/s/blog_17b5382a20102xtg8.html http://blog.sina.com.cn/s/blog_17b5382a20102xtga.html http://blog.sina.com.cn/s/blog_17b5382a20102xtgb.html http://blog.sina.com.cn/s/blog_17b5382a20102xtgc.html http://blog.sina.com.cn/s/blog_17baa4f330102wxsx.html http://blog.sina.com.cn/s/blog_17baa4f330102wxsy.html http://blog.sina.com.cn/s/blog_17baa4f330102wxsz.html http://blog.sina.com.cn/s/blog_17baa4f330102wxt0.html http://blog.sina.com.cn/s/blog_17baa4f330102wxt1.html https://club.1688.com/threadview/49696723.htm https://club.1688.com/threadview/49696750.htm https://club.1688.com/threadview/49696758.htm https://club.1688.com/threadview/49696768.htm http://baijiahao.baidu.com/builder/preview/s?id=1581948825320626187 http://baijiahao.baidu.com/builder/preview/s?id=1581949373717418375 http://baijiahao.baidu.com/builder/preview/s?id=1581949504752257022 http://baijiahao.baidu.com/builder/preview/s?id=1581949628525014624 http://baijiahao.baidu.com/builder/preview/s?id=1581949794692411463 http://baijiahao.baidu.com/builder/preview/s?id=1581950036340781106 https://tieba.baidu.com/p/5385005459 https://tieba.baidu.com/p/5385095696 https://www.douban.com/note/641935862/ https://www.19lou.com/board-56081508570206074-thread-56241508570579468-1.html https://www.19lou.com/board-56081508570206074-thread-56351508571299964-1.html https://www.19lou.com/wap/board-56081508570206074-thread-48391508572110589-1.html https://www.19lou.com/board-56091508570886242-thread-56571508586179505-1.html https://www.19lou.com/board-56091508570886242-thread-53921508590662025-1.html https://www.19lou.com/wap/board-48121508590547628-thread-73551508590711589-1.html http://www.19lou.com/board-48061508479844091-thread-56961508555784191-1.html http://www.19lou.com/board-48061508479844091-thread-56451508556735798-1.html http://www.19lou.com/board-48061508479844091-thread-56271508558579911-1.html http://www.19lou.com/board-48061508479844091-thread-56561508561871011-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53171508556828094-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53961508564806973-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53 9ffc 181508566578551-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53401508568058642-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53121508571881462-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53581508573216301-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53601508573369685-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53621508573529197-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53671508573749530-1.html http://taizhou.19lou.com/board-49081508556617184-thread-53731508573970612-1.html https://www.douban.com/note/641934310/ https://www.douban.com/note/641934119/ https://www.douban.com/note/641934401/ http://www.19lou.com/board-73061508556280516-thread-49341508573298850-1.html http://www.19lou.com/board-73061508556280516-thread-49821508572317344-1.html http://www.19lou.com/board-73061508556280516-thread-49531508571648305-1.html http://www.19lou.com/board-73061508556280516-thread-49501508571346263-1.html http://www.19lou.com/board-73061508556280516-thread-49481508566877867-1.html http://www.19lou.com/board-73061508556280516-thread-49361508565965149-1.html http://www.19lou.com/board-73061508556280516-thread-49281508565418274-1.html http://www.19lou.com/board-73061508556280516-thread-49941508556806027-1.html http://www.19lou.com/board-73061508556280516-thread-49871508556671497-1.html http://www.19lou.com/board-73061508556280516-thread-49751508556417484-1.html https://www.wang1314.com/doc/topic-6578555-1.html https://www.wang1314.com/doc/topic-6579098-1.html https://www.wang1314.com/doc/topic-6579547-1.html https://www.wang1314.com/doc/topic-6579708-1.html https://www.wang1314.com/doc/topic-6579918-1.html https://www.wang1314.com/doc/topic-6581520-1.html https://www.wang1314.com/doc/topic-6581695-1.html https://www.wang1314.com/doc/topic-6585393-1.html https://www.wang1314.com/doc/topic-6585468-1.html https://www.wang1314.com/doc/topic-6585531-1.html http://dy.163.com/v2/article/detail/D19L662A0523LCR7.html http://dy.163.com/v2/article/detail/D19MRC0Q0517MR88.html http://dy.163.com/v2/article/detail/D19N7R8A0523LCR7.html http://dy.163.com/v2/article/detail/D19NSPJ40523LCR7.html http://dy.163.com/v2/article/detail/D19O6SQE0517MQQ2.html http://dy.163.com/v2/article/detail/D19ON61R0517MQQ2.html http://dy.163.com/v2/article/detail/D19PGPM00517MQQ2.html http://dy.163.com/v2/article/detail/D19PNBCP0517MQQ2.html http://dy.163.com/v2/article/detail/D19UD4830517MQQ2.html http://blog.sina.com.cn/s/blog_17b52c5a90102xnyf.html http://blog.sina.com.cn/s/blog_17b52c5a90102xnyg.html http://blog.sina.com.cn/s/blog_17b52c5a90102xnyi.html http://blog.sina.com.cn/s/blog_17b52c5a90102xnyj.html http://blog.sina.com.cn/s/blog_17b52c5a90102xnyk.html http://blog.sina.com.cn/s/blog_17b539da20102xdfe.html http://blog.sina.com.cn/s/blog_17b539da20102xdff.html http://blog.sina.com.cn/s/blog_17b539da20102xdfg.html http://blog.sina.com.cn/s/blog_17b539da20102xdfh.html http://blog.sina.com.cn/s/blog_17b539da20102xdfn.html https://buluo.qq.com/p/detail.html?bid=329211&pid=1242779-1508657617 http://www.chengshiluntan.com/6914932-1.html http://www.chengshiluntan.com/6914984-1.html http://www.chengshiluntan.com/6915011-1.html http://www.chengshiluntan.com/6915016-1.html http://www.chengshiluntan.com/6915023-1.html http://www.chengshiluntan.com/6915100-1.html http://www.chengshiluntan.com/6915106-1.html http://www.chengshiluntan.com/6915118-1.html http://www.chengshiluntan.com/6915134-1.html http://www.19lou.com/board-49041508472050881-thread-48701508556947506-1.html http://www.19lou.com/board-49041508472050881-thread-53791508570448292-1.html http://www.chengshiluntan.com/6911287-1.html http://www.chengshiluntan.com/6911538-1.html http://www.chengshiluntan.com/6911778-1.html http://www.chengshiluntan.com/6911782-1.html https://www.wang1314.com/doc/topic-6454177-1.html https://www.wang1314.com/doc/topic-6454648-1.html https://www.wang1314.com/doc/topic-6454954-1.html https://www.wang1314.com/doc/topic-6455395-1.html https://www.wang1314.com/doc/topic-6458085-1.html https://www.wang1314.com/doc/topic-6458362-1.html https://www.wang1314.com/doc/topic-6458636-1.html https://www.wang1314.com/doc/topic-6458806-1.html https://www.wang1314.com/doc/topic-6459305-1.html https://www.wang1314.com/doc/topic-6459504-1.html http://www.sohu.com/a/198856653_100034855 http://www.sohu.com/a/198861115_100034855 https://www.3566t.com/sell/s10667341.html https://club.1688.com/threadview/49690686.htm http://www.chengshiluntan.com/6907965-1.html https://www.wang1314.com/doc/topic-6395405-1.html https://www.wang1314.com/doc/topic-6395618-1.html https://www.wang1314.com/doc/topic-6395832-1.html https://www.wang1314.com/doc/topic-6396078-1.html https://www.wang1314.com/doc/topic-6396251-1.html https://www.wang1314.com/doc/topic-6397065-1.html https://www.wang1314.com/doc/topic-6397173-1.html https://www.wang1314.com/doc/topic-6397294-1.html https://www.wang1314.com/doc/topic-6397416-1.html http://www.sohu.com/a/198612284_100034855 http://www.sohu.com/a/198616261_100034855 http://www.sohu.com/a/198619084_100034855 https://club.1688.com/threadview/49686645.htm https://club.1688.com/threadview/49686783.htm https://club.1688.com/threadview/49686957.htm http://www.99inf.com/zyfw/ybsw/5344538.html http://blog.sina.com.cn/s/blog_17b5382a20102xt9a.html http://blog.sina.com.cn/s/blog_17b5382a20102xt99.html http://blog.sina.com.cn/s/blog_17b5382a20102xt9d.html http://blog.sina.com.cn/s/blog_17baa4f330102wxmv.html http://blog.sina.com.cn/s/blog_17baa4f330102wxmy.html http://blog.sina.com.cn/s/blog_17baa4f330102wxn0.html http://blog.sina.com.cn/s/blog_17baa4f330102wxn3.html http://blog.sina.com.cn/s/blog_17baa4f330102wxn5.html http://blog.tianya.cn/post-7664061-129236581-1.shtml http://blog.tianya.cn/post-7664061-129236622-1.shtml http://blog.tianya.cn/post-7664061-129236631-1.shtml http://blog.tianya.cn/post-7664061-129236635-1.shtml http://blog.tianya.cn/post-7664061-129236678-1.shtml
相关文章推荐
- 启动targetcli时遭遇ImportError: cannot import name ALUATargetPortGroup故障
- Python Error: ImportError: cannot import name gof
- Error creating bean with name 'XXX' in the [XXXX.xml] --The import XXX cannot be resolved
- ImportError: cannot import name mkdtemp
- scrapy引用包出错ImportError : cannot import name '_win32stdio'
- ubuntu 16.04 ros kinetic Moveit Python: ImportError: cannot import name structs
- python使用scipy.misc import imread报错:ImportError: cannot import name imread
- Windows下 ImportError: cannot import name BeautifulSoup
- ImportError: cannot import name HTTPSHandler
- Python: ImportError: cannot import name 'BeautifulSoup'
- ImportError at /polls cannot import name patterns
- ImportError: cannot import name IncompleteRead
- ImportError cannot import name BytesIO when import caffe
- Fixing ImportError: cannot import name ‘urlencode’ in Python3
- Python——报错:ImportError: cannot import name requests
- Python模块Scrapy导入出错:ImportError: cannot import name xmlrpc_client
- ImportError: cannot import name webdriver
- ImportError: cannot import name 'patterns'
- ImportError: cannot import name HTMLParser
- 求救,import talib 提示:ImportError: cannot import name __TA_FUNCTION_NAMES__