错误记录-2023-4

uvtec@uvtec-MS-7B98:~$ sudo ubuntu-drivers autoinstall
Traceback (most recent call last):
File “/usr/bin/ubuntu-drivers”, line 513, in
greet()
File “/usr/lib/python3/dist-packages/click/core.py”, line 1128, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1053, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python3/dist-packages/click/core.py”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/core.py”, line 754, in invoke
return __callback(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/decorators.py”, line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 754, in invoke
return __callback(*args, **kwargs)
File “/usr/bin/ubuntu-drivers”, line 432, in autoinstall
command_install(config)
File “/usr/bin/ubuntu-drivers”, line 187, in command_install
UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
File “/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py”, line 839, in nvidia_desktop_pre_installation_hook
with_nvidia_kms = version >= 470
UnboundLocalError: local variable ‘version’ referenced before assignment

办法:
这个报错看起来似乎与 Ubuntu 驱动管理器的 Nvidia 驱动程序检测有关。根据报错信息,似乎在检测 Nvidia 驱动版本时发生了错误。建议您尝试以下步骤来解决这个问题:

首先,您可以尝试更新系统并升级所有软件包到最新版本。您可以使用以下命令执行此操作:
sql
Copy code
sudo apt update && sudo apt upgrade
如果更新软件包不起作用,请尝试更新 Nvidia 驱动程序到最新版本。您可以使用以下命令执行此操作:
Copy code
sudo apt install nvidia-driver
如果更新 Nvidia 驱动程序不起作用,请尝试使用 ubuntu-drivers 命令手动安装适合您的 Nvidia 驱动程序版本。您可以使用以下命令列出可用的驱动程序:
Copy code
ubuntu-drivers list
然后,您可以使用以下命令安装适合您的 Nvidia 驱动程序版本:

Copy code
sudo ubuntu-drivers autoinstall
如果仍然遇到问题,请尝试在 Ubuntu 官方论坛或社区中寻求帮助。

uvtec@uvtec-MS-7B98:~$ sudo usb_modeswitch -KW -v 0bda -p 1a2b
Take all parameters from the command line

  • usb_modeswitch: handle USB devices with multiple modes
  • Version 2.6.1 © Josua Dietze 2017
  • Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0bda
DefaultProduct= 0x1a2b

StandardEject=1

Look for default devices …
found USB ID 1d6b:0003
found USB ID 1d6b:0002
found USB ID 0781:5567
found USB ID 174c:235c
found USB ID 1d6b:0003
found USB ID 093a:2510
found USB ID 0bda:1a2b
vendor ID matched
product ID matched
found USB ID 17ef:6018
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration …
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x0b (out) and 0x8a (in)

USB description data (for identification)

Manufacturer: Realtek
Product: DISK
Serial No.: not provided

Sending standard EJECT sequence
Looking for active drivers …
Set up interface 0
Use endpoint 0x0b for message sending …
Trying to send message 1 to endpoint 0x0b …
Sending the message returned error -7. Try to continue
Read the response to message 1 (CSW) …
Response reading failed (error -7)
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

深耕AI

谢谢鼓励~我将继续创作优质博文

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值