[Kernel/Drive] 文件名乱码导致command-not-found报错
Tofloor
poster avatar
Red54
deepin
2025-01-20 18:47
Author

driver-23里的软件包printer-driver-bisheng-lexmark-z23-z33-color-jetprinter里有一个文件名是乱码的文件usr/share/ppd/printer-driver-deepinwine/Lexmark \xb4\xf2\xd3\xa1\xbb\xfa\xc7\xfd\xb6\xaf\xb3\xcc\xd0\xf2-Lexmark Z23-Z33 Color Jetprinter.ppd,会导致command-not-found更新时报错。

Reply Favorite View the author
All Replies
raspbian
deepin
2025-01-20 20:41
#1

给你翻译一下 你所说的乱码叫 网络连接成功

不要把一切你看不懂的东西都叫乱码

Reply View the author
Red54
deepin
2025-01-20 20:57
#2
raspbian

给你翻译一下 你所说的乱码叫 网络连接成功

不要把一切你看不懂的东西都叫乱码

对于command-not-found来说这就是乱码,command-not-found只支持utf-8文件名。

Reply View the author
Red54
deepin
2025-01-20 21:10
#3
raspbian

给你翻译一下 你所说的乱码叫 网络连接成功

不要把一切你看不懂的东西都叫乱码

另外\xb4\xf2\xd3\xa1\xbb\xfa\xc7\xfd\xb6\xaf\xb3\xcc\xd0\xf2对应的GB18030字符是“打印机驱动程序”,你说的“网络连接成功”是哪里来的?

Reply View the author
raspbian
deepin
2025-01-20 23:31
#4
Red54

另外\xb4\xf2\xd3\xa1\xbb\xfa\xc7\xfd\xb6\xaf\xb3\xcc\xd0\xf2对应的GB18030字符是“打印机驱动程序”,你说的“网络连接成功”是哪里来的?

那你就得问写程序那个人了

Reply View the author
Red54
deepin
2025-01-21 09:42
#5

@zccrs

printer-driver-bisheng-lexmark-z23-z33-color-jetprinter软件包的维护者是lvguo@deepin.com ,其是离职了还是什么情况?这个文件名编码错误的问题是否有人修?

Reply View the author
Red54
deepin
2025-02-08 10:45
#6

@zccrs

这问题还没处理。

Reply View the author
zccrs
deepin
2025-02-10 16:18
#7
Red54

@zccrs

这问题还没处理。

看到了,我找人看看

Reply View the author
running
deepin
2025-02-11 10:13
#8

@Red54 驱动已更新,先在终端执行一下 sudo apt update 命令。

Reply View the author
Red54
deepin
2025-02-13 14:37
#9
running

@Red54 驱动已更新,先在终端执行一下 sudo apt update 命令。

@running @zccrs

你们更新什么了?

printer-driver-bisheng-lexmark-z23-z33-color-jetprinter的MD5根本没变,还是8896be15e1fecd2adf5a50e4d9cd8f8d

简单到我都不想说的复现步骤:

1、确定启用了driver-23软件仓库:

$ cat /etc/apt/sources.list.d/driver.list
# Written by dde-printer
deb https://community-packages.deepin.com/driver-23/ driver non-free

2、安装command-not-found:

$ sudo apt install command-not-found

3、运行apt update:

$ sudo apt update
...
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 32, in 
    col.create(db)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 96, in create
    self._fill_commands(con)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 141, in _fill_commands
    self._parse_single_contents_file(con, f, sub.stdout)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 241, in _parse_single_contents_file
    l = l.decode("utf-8")
        ^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 48: invalid start byte
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
Reply View the author
Red54
deepin
2025-02-13 14:47
#10

@running @zccrs
image.png

就是这个乱码文件名,那处乱码是GB18030编码的“打印机驱动程序”,command-not-found只支持UTF-8编码,你们的其他软件包里的文件的文件名都是UTF-8/ASCII编码,就printer-driver-bisheng-lexmark-z23-z33-color-jetprinter这个软件包里面的这个文件的文件名用了GB18030编码。

Reply View the author
running
deepin
2025-02-17 10:28
#11

@Red54 非常抱歉,我忘记查看论坛的回复了。我这边在2月11日提交了新的驱动包,直到2月14日才完成同步。没想到由于上周外网服务器进行了迁移,导致整个过程耽搁了三天。麻烦你再执行一下 sudo apt update 命令更新一下驱动包。

Reply View the author