インストールされたパッケージの実装されていない依存関係を無視するにはどうすればよいですか?

インストールされたパッケージの実装されていない依存関係を無視するにはどうすればよいですか?

.deb何らかの理由でOpera 12.16をインストールしました。特定のブラウザの特定のバージョンが必要で、他のオプションがないとしましょう。

しかし、このdebは私のディストリビューションに含まれなくなったパッケージ(gstreamer0.10シリーズなど)に依存しています(Debianテスト済み)。これは適切な失敗を生み出しますすべてapt remove opera依存関係エラーを除くアクション:

# apt install cli-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 opera : Depends: gstreamer0.10-plugins-good but it is not installable
         Recommends: flashplugin-nonfree but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

apt --fix-broken installOperaの削除のみを提案します。

# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  opera
0 upgraded, 0 newly installed, 1 to remove and 92 not upgraded.
1 not fully installed or removed.
After this operation, 46.6 MB disk space will be freed.
Do you want to continue? [Y/n]

現在の私の回避策は、必要に応じてOperaをインストールし、aptで他のタスクを実行する必要がある場合はすぐに削除することです。これは非常に迷惑なことです。

どんな提案がありますか?理想的には、オペラの依存関係を決して無視しない傾向があります。なぜならそれだけでも私の目的には十分だからです。

ベストアンサー1

依存関係を無視することはできませんが、欠落している依存関係を満たすためにapt偽のパッケージを作成できますgstreamer0.10-plugins-good。最も簡単な方法はequivs:

  1. インストールするequivs

    sudo apt install equivs
    
  2. テンプレート制御ファイルの生成

    equivs-control gstreamer0.10-plugins-good.control
    
  3. パッケージ名の変更

    sed -i 's/<package name; defaults to equivs-dummy>/gstreamer0.10-plugins-good/g' gstreamer0.10-plugins-good.control
    
  4. パッケージビルド

    equivs-build gstreamer0.10-plugins-good.control
    
  5. インストールする

    sudo dpkg -i gstreamer0.10-plugins-good_1.0_all.deb
    

これはoperaパッケージの依存関係を満たす必要があります。

おすすめ記事