Im using Ubuntu 18.04 and I ran into a problem with apt. Im trying to install Node JS but I get this error whenever trying to install things:
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)
The output of sudo-apt-get install -f gives me:
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)
This command: sudo dpkg --configure -a outputs:
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
From all this, I can tell that usb-modeswitch-data is messing things up. When i try to remove it I get:
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
Output when trying to reinstall:
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)