欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

 更新時間:2017年10月26日 08:36:20   作者:Leshami  
這篇文章主要介紹了啟動targetcli時遇到錯誤解決辦法的相關(guān)資料,希望通過本文能幫助到大家,讓大家遇到這樣的錯誤解決,需要的朋友可以參考下

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

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

一、故障現(xiàn)象

當前環(huán)境
[root@centos7-router ~]# more /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core)

安裝targetcli工具包
# yum install targetcli

故障現(xiàn)象
[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 ALUATargetPortGroup

二、解決方案

從上面的錯誤提示可知,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可以正常工作,繼續(xù)google,原來是缺少python-rtslib這個包。

[root@centos7-router ~]# yum install python-rtslib -y

再次執(zhí)行成功
[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 

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

相關(guān)文章

  • Python?GUI和游戲開發(fā)從入門到實踐

    Python?GUI和游戲開發(fā)從入門到實踐

    GUI是圖形用戶界面的縮寫,圖形化的用戶界面對使用過計算機的人來說應(yīng)該都不陌生,下面這篇文章主要給大家介紹了關(guān)于Python圖形用戶界面與游戲開發(fā)的相關(guān)資料,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下
    2023-05-05
  • OpenCV實戰(zhàn)之圖像拼接的示例代碼

    OpenCV實戰(zhàn)之圖像拼接的示例代碼

    圖像拼接可以應(yīng)用到手機中的全景拍攝,也就是將多張圖片根據(jù)關(guān)聯(lián)信息拼成一張圖片。本文將介紹利用Python OpenCV實現(xiàn)圖像拼接的方法,感興趣的可以試一試
    2022-01-01
  • python3實現(xiàn)抓取網(wǎng)頁資源的 N 種方法

    python3實現(xiàn)抓取網(wǎng)頁資源的 N 種方法

    這兩天學習了python3實現(xiàn)抓取網(wǎng)頁資源的方法,發(fā)現(xiàn)了很多種方法,所以,今天添加一點小筆記。
    2017-05-05
  • Flask登錄注冊項目的簡單實現(xiàn)

    Flask登錄注冊項目的簡單實現(xiàn)

    一個簡單的用戶注冊和登錄的頁面,涉及到驗證,數(shù)據(jù)庫存儲等等,本文主要介紹了Flask登錄注冊項目的簡單實現(xiàn),從目錄結(jié)構(gòu)開始,感興趣的可以了解一下
    2021-05-05
  • Python中閉包與lambda的作用域解析

    Python中閉包與lambda的作用域解析

    這篇文章主要介紹了Python中閉包與lambda的作用域解析,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-07-07
  • keras如何指定運行時顯卡及限制GPU用量

    keras如何指定運行時顯卡及限制GPU用量

    這篇文章主要介紹了keras如何指定運行時顯卡及限制GPU用量問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • pandas數(shù)據(jù)處理清洗實現(xiàn)中文地址拆分案例

    pandas數(shù)據(jù)處理清洗實現(xiàn)中文地址拆分案例

    因為后續(xù)數(shù)據(jù)分析工作需要用到地理維度進行分析,所以需要把login_place字段進行拆分成:國家、省份、地區(qū)。感興趣的可以了解一下
    2021-06-06
  • 編寫Python腳本來獲取Google搜索結(jié)果的示例

    編寫Python腳本來獲取Google搜索結(jié)果的示例

    這篇文章主要介紹了編寫Python腳本來獲取Google搜索結(jié)果的示例,也是利用Python編寫爬蟲的一個簡單實現(xiàn),需要的朋友可以參考下
    2015-05-05
  • Python實現(xiàn)RabbitMQ6種消息模型的示例代碼

    Python實現(xiàn)RabbitMQ6種消息模型的示例代碼

    這篇文章主要介紹了Python實現(xiàn)RabbitMQ6種消息模型的示例代碼,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-03-03
  • 利用在Python中數(shù)值模擬研究氣體擴散

    利用在Python中數(shù)值模擬研究氣體擴散

    在 Python 中,可以使用數(shù)值模擬來研究氣體擴散。本文就來通過一些示例為大家講講具體的實現(xiàn)方法,文中的示例代碼講解詳細,感興趣的小伙伴可以學習一下
    2023-01-01

最新評論