アップデートや一部のパッケージのアップグレードやインストールもできません

アップデートや一部のパッケージのアップグレードやインストールもできません

アップグレード中にこのエラーが発生しました。どこで間違えたのか分かりません。

アップグレードやインストール、あるいは dpkg の設定をしようとすると、必ずこのエラーが発生します。

私はこの問題に直面しています2週間以来StackExchange と UbuntuForum でいろいろ検索した後、この質問をここに投稿します。

助けてください

私は現在Ubuntu 18.04.03 LTS

divyang@divyang:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-55 linux-headers-4.15.0-55-generic
  linux-headers-4.18.0-15 linux-headers-4.18.0-15-generic
  linux-image-4.15.0-55-generic linux-image-4.18.0-15-generic
  linux-modules-4.15.0-55-generic linux-modules-4.18.0-15-generic
  linux-modules-extra-4.15.0-55-generic linux-modules-extra-4.18.0-15-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/321 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package gvfs-backends (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 gvfs-backends
E: Sub-process /usr/bin/dpkg returned an error code (1)
divyang@divyang:~$ sudo dpkg --configure -a
dpkg: error processing package gvfs-backends (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 gvfs-backends

前もって感謝します :)

答え1

まずパッケージをアンインストールしてから、再度インストールしてみてください。

sudo apt remove --purge gvfs-backends; sudo apt install gvfs-backends

そしてアップグレードを実行します:

sudo apt upgrade

関連情報