国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

啟動targetcli時遇到錯誤解決辦法

2020-01-04 16:39:56
字體:
來源:轉載
供稿:網友

 啟動targetcli時遭遇ImportError: cannot import name ALUATargetPortGroup故障

targetcli是一個iSCSI配置管理工具,該工具簡單易用,可以直接替換scsi-target-utils。滿心歡喜的裝上它,正準備一睹為快,就杯具了。報錯ImportError: cannot import name ALUATargetPortGroup。下面就這針對這個錯誤的解決方案。

一、故障現象

當前環境[root@centos7-router ~]# more /etc/redhat-release CentOS Linux release 7.2.1511 (Core)安裝targetcli工具包# yum install targetcli故障現象[root@centos7-router ~]# targetcliTraceback (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 ALUATargetPortGroupImportError: cannot import name ALUATargetPortGroup

二、解決方案

從上面的錯誤提示可知,python文件有問題。于是驗證一下python是否已正確安裝[root@centos7-router ~]# pythonPython 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> python可以正常工作,繼續google,原來是缺少python-rtslib這個包。[root@centos7-router ~]# yum install python-rtslib -y再次執行成功[root@centos7-router ~]# targetclitargetcli shell version 2.1.fb46Copyright 2011-2013 by Datera, Inc and others.For help on commands, type 'help'./> helpGENERALITIES============This is a shell in which you can create, delete and configureconfiguration objects.The available commands depend on the current path or targetpath you want to run a command in: different path havedifferent sets of available commands, i.e. a path pointing atan 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 yourcurrent path. Alternatively (useful if the prompt displaysan abbreviated path to save space), you can run thepwd command to display the complete current path.Navigating the tree is done using the cd command. Withoutany argument, cd will present you wil the full objectstree. Just use arrows to select the destination path, andenter will get you there. Please try help cd for navigationtips.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 helpCOMMAND to get more information.AVAILABLE COMMANDS==================The following commands are available in thecurrent 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 

如有疑問,請留言或者到本站社區交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 会昌县| 富川| 美姑县| 宝丰县| 武安市| 高邮市| 揭西县| 都昌县| 阿勒泰市| 武邑县| 兰溪市| 卢氏县| 丹东市| 仙居县| 平阴县| 微山县| 蒙阴县| 勃利县| 大洼县| 河间市| 攀枝花市| 施秉县| 开化县| 珠海市| 深水埗区| 塘沽区| 蕲春县| 荃湾区| 佛学| 亳州市| 民丰县| 宁安市| 政和县| 章丘市| 永济市| 三台县| 林西县| 咸宁市| 册亨县| 聂荣县| 鄂伦春自治旗|