apt-get purge が満たされていない依存関係について文句を言います。

apt-get purge が満たされていない依存関係について文句を言います。

別のIME(fcitx)を新しくインストールするために、すべてのIMEパッケージを削除しようとしています。私はこれを試しました:

apt-get purge ibus-anthy anthy anthy-common libanthy0 \
  ibus-mozc mozc-data mozc-server mozc-utils-gui \
  ^ibus.+ gir1.2-ibus.+ im-config python-ibus libpyzy-1.0.0 \
  libsunpinyin3 sunpinyin-data

次のような出力が提供され、満たされていない依存関係が原因で最終的に失敗します。 「インストール」が「削除」であると仮定しても、これはまだ奇妙な苦情のようです。上記のコマンドラインから明示的なibus-xxxパッケージを削除しようとしましたが(正規表現の重複によって問題が発生した場合)、違いはありませんでした。私は何が間違っていましたか?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'ibus-libthai' for regex '^ibus.'
Note, selecting 'ibus-table' for regex '^ibus.'
Note, selecting 'ibus-doc' for regex '^ibus.'
Note, selecting 'ibus-table-cantonese' for regex '^ibus.'
Note, selecting 'ibus-table-ipa-x-sampa' for regex '^ibus.'
Note, selecting 'ibus-table-thai' for regex '^ibus.'
Note, selecting 'ibus-table-jyutping' for regex '^ibus.'
Note, selecting 'ibus-table-yawerty' for regex '^ibus.'
Note, selecting 'ibus-cangjie' for regex '^ibus.'
Note, selecting 'ibus-anthy-dev' for regex '^ibus.'
Note, selecting 'ibus-table-cangjie-big' for regex '^ibus.'
Note, selecting 'ibus-table-wubi' for regex '^ibus.'
Note, selecting 'ibus-table-translit' for regex '^ibus.'
Note, selecting 'ibus-sunpinyin' for regex '^ibus.'
Note, selecting 'ibus-el' for regex '^ibus.'
Note, selecting 'ibus-table-translit-ua' for regex '^ibus.'
Note, selecting 'ibus-table-scj6' for regex '^ibus.'
Note, selecting 'ibus-pinyin' for regex '^ibus.'
Note, selecting 'ibus-chewing' for regex '^ibus.'
Note, selecting 'ibus-table-cangjie' for regex '^ibus.'
Note, selecting 'ibus-table-yong' for regex '^ibus.'
Note, selecting 'ibus-table-cns11643' for regex '^ibus.'
Note, selecting 'ibus-table-extraphrase' for regex '^ibus.'
Note, selecting 'ibus-table-cantonhk' for regex '^ibus.'
Note, selecting 'ibus-table-emoji' for regex '^ibus.'
Note, selecting 'ibus-array' for regex '^ibus.'
Note, selecting 'ibus-tabel-erbi' for regex '^ibus.'
Note, selecting 'ibus-m17n' for regex '^ibus.'
Note, selecting 'ibus-mozc' for regex '^ibus.'
Note, selecting 'ibus-xkbc' for regex '^ibus.'
Note, selecting 'ibus-qt4' for regex '^ibus.'
Note, selecting 'ibus-gtk' for regex '^ibus.'
Note, selecting 'ibus-table-quick-classic' for regex '^ibus.'
Note, selecting 'ibus-chewing-dbg' for regex '^ibus.'
Note, selecting 'ibus-table-quick' for regex '^ibus.'
Note, selecting 'ibus-hangul' for regex '^ibus.'
Note, selecting 'ibus-table-easy' for regex '^ibus.'
Note, selecting 'ibus-table-rustrad' for regex '^ibus.'
Note, selecting 'ibus-table-wu' for regex '^ibus.'
Note, selecting 'ibus-anthy' for regex '^ibus.'
Note, selecting 'ibus-clutter' for regex '^ibus.'
Note, selecting 'ibus-table-cangjie3' for regex '^ibus.'
Note, selecting 'ibus-table-cangjie5' for regex '^ibus.'
Note, selecting 'ibus-table-stroke5' for regex '^ibus.'
Note, selecting 'ibus-table-easy-big' for regex '^ibus.'
Note, selecting 'ibus-table-quick3' for regex '^ibus.'
Note, selecting 'ibus-table-quick5' for regex '^ibus.'
Note, selecting 'ibus-input-pad' for regex '^ibus.'
Note, selecting 'ibus-rime' for regex '^ibus.'
Note, selecting 'ibus-table-array30' for regex '^ibus.'
Note, selecting 'ibus-table-erbi' for regex '^ibus.'
Note, selecting 'ibus-gtk3' for regex '^ibus.'
Note, selecting 'ibus-tegaki' for regex '^ibus.'
Note, selecting 'ibus-table-latex' for regex '^ibus.'
Note, selecting 'ibus-table-erbi-qs' for regex '^ibus.'
Note, selecting 'ibus-googlepinyin' for regex '^ibus.'
Note, selecting 'ibus-libpinyin' for regex '^ibus.'
Note, selecting 'ibus-table-viqr' for regex '^ibus.'
Note, selecting 'ibus-skk' for regex '^ibus.'
Note, selecting 'ibus-table-compose' for regex '^ibus.'
Note, selecting 'ibus-unikey' for regex '^ibus.'
Note, selecting 'gir1.2-ibus-1.0' for regex 'gir1.2-ibus.'
Note, selecting 'libpyzy-1.0-0' for regex 'libpyzy-1.0.0'
gir1.2-ibus-1.0 is already the newest version.
gir1.2-ibus-1.0 set to manually installed.
ibus-anthy is already the newest version.
ibus-pinyin is already the newest version.
ibus-sunpinyin is already the newest version.
ibus-table is already the newest version.
ibus-table set to manually installed.
ibus-table-wubi is already the newest version.
ibus-mozc is already the newest version.
ibus-table-translit is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ibus-anthy : Depends: anthy but it is not going to be installed
              Depends: libanthy0 but it is not going to be installed
 ibus-anthy-dev : Depends: anthy but it is not going to be installed
 ibus-array : Depends: python-ibus but it is not going to be installed
 ibus-el : Depends: python-ibus but it is not going to be installed
 ibus-googlepinyin : Depends: python-ibus but it is not going to be installed
 ibus-mozc : Depends: mozc-data but it is not going to be installed
 ibus-pinyin : Depends: libpyzy-1.0-0 but it is not going to be installed
               Depends: python-ibus but it is not going to be installed
 ibus-sunpinyin : Depends: libsunpinyin3 but it is not going to be installed
                  Depends: sunpinyin-data but it is not going to be installed
 ibus-xkbc : Depends: python-ibus but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答え1

apt-get purge ibus-anthy anthy anthy-common libanthy0 \
  ibus-mozc mozc-data mozc-server mozc-utils-gui \
  ^ibus.+ gir1.2-ibus.+ im-config python-ibus libpyzy-1.0.0 \
  libsunpinyin3 sunpinyin-data

もちろん、apt-getにibusandで始まるすべてのパッケージをインストールするように指示したからですgir1.2-ibus+パッケージ名の末尾には、apt-get はそのパッケージを正規表現の+一部と見なさないため、apt-get にこれらのパッケージをインストールするように指示します。「参考に「ibus-table-viqr」を選択してください。正規表現「^ibus」。。まだまたはそれ以上.+に交換する必要があります。代わりに使用してください。.*.?$

この動作を説明するマニュアルページの関連部分は次のとおりです。

与えられた式に一致するパッケージがなく、式に「.」、「?」または、"*"のいずれかが含まれている場合は、POSIX正規表現と見なされ、データベース内のすべてのパッケージ名に適用されます。次に、一致をインストール(または削除)します。一致は部分文字列で行われるため、「lo.*」は「how-lo」および「lowest」と一致します。これが発生しないようにするには、「^」または「$」文字を使用して正規表現を変更するか、より具体的な正規表現を作成します。

関連情報