ntfs-config 报错

·
Linux apt sudo install 处理 usr 方案 subl ntfs-config FstabUtility.py March 13, 2020
!本文可能 超过2年没有更新,今后内容也许不会被维护或者支持,部分内容可能具有时效性,涉及技术细节或者软件使用方面,本文不保证相应的技术更新和实践可操作性。

ntfs-config 报错 IndexError list index out of range

安装

sudo apt install ntfs-config

报错

01

处理方案

编辑/usr/lib/python2.7/dist-packages/NtfsConfig/Fstab/FstabUtility.py,记得sudo
例如:

sudo subl /usr/lib/python2.7/dist-packages/NtfsConfig/Fstab/FstabUtility.py

错误就在这里

    for line in lines :
       res = line.split()
       if os.path.exists(res[1]) and os.path.realpath(res[1]) == entry["DEVICE"] :
           entry["FSTAB_TYPE"] = entry["FS_TYPE"]

增加一个index判断,确保只有存在 res[1]的时候才运行程序.
注意py语言的特色,要调整下方行的缩进.

修该如下图:
02

sudo ntfs-config

03

扩展链接

ntfs-config 报错 IndexError list index out of range - [传送阵]


首次创建时间:2020-03-13 00:31:00
最后修改时间:2020-04-06 16:26:33

  • GRUB 配置详解
  • 2020.4.4 全国哀悼

_(:3 」∠)_
(抱歉)
自发布之日起超123天后自动关闭评论哦!


© 2025 Mr.Cui's Blog. Using Typecho & Moricolor.

鲁ICP备16004095号-2
鲁公网安备37028502250699号
HTTP/3 IPv6