我正在使用Ubuntu18.04,我在apt上遇到了一个问题。我试图安装Node JS,但是每当试图安装这些东西时,我都会遇到这样的错误:
dpkg: error processing package usb-modeswitch-data (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
usb-modeswitch-data
E: Sub-process /usr/bin/dpkg returned an error code (1)sudo-apt-get install -f的输出给了我:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0 B/30.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package usb-modeswitch-data (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
usb-modeswitch-data
E: Sub-process /usr/bin/dpkg returned an error code (1)这个命令:sudo dpkg --configure -a输出:
dpkg: error processing package usb-modeswitch-data (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
usb-modeswitch-data从这一切中,我可以看出usb-modeswitch-data正在把事情搞砸。当我试图移除它时,我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
usb-modeswitch-data*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 96.3 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: error processing package usb-modeswitch-data (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
usb-modeswitch-data试图重新安装时输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/30.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package usb-modeswitch-data (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
usb-modeswitch-data
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2021-03-11 00:27:59
绝对更糟糕的情况是,如果需要,可以手动删除文件,并编辑/var/lib/dpkg/status以删除其在安装时对它的引用。下面需要删除的文件,然后是文件中的引用。
zeus@buster-raspi:~$ apt-file list usb-modeswitch-data
usb-modeswitch-data: /lib/udev/rules.d/40-usb_modeswitch.rules
usb-modeswitch-data: /usr/share/bug/usb-modeswitch-data/presubj
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/NEWS.Debian.gz
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/README.Debian
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/README.gz
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/changelog.Debian.gz
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/changelog.gz
usb-modeswitch-data: /usr/share/doc/usb-modeswitch-data/copyright
usb-modeswitch-data: /usr/share/lintian/overrides/usb-modeswitch-data
usb-modeswitch-data: /usr/share/usb_modeswitch/configPack.tar.gz发布于 2021-03-11 00:36:17
我不想听起来像“IT人群”,但你试过卸载并重新安装它吗?!
这能帮上忙吗!
https://kreationnext.com/support/how-to-install-usb-modeswitch-data-on-debian-unstable-sid/
U18.04是建立在DEB上的,应该能工作。希望这能有所帮助!
https://askubuntu.com/questions/1322654
复制相似问题