依存関係が満たされていないため、Linuxヘッダーをインストールできません。

依存関係が満たされていないため、Linuxヘッダーをインストールできません。

Debian のインストール後、すぐにテスト用にリポジトリを変更しました。

$ cat /etc/apt/sources.list
# Debian packages for testing
deb http://ftp.by.debian.org/debian/ testing main non-free contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
deb-src http://ftp.by.debian.org/debian/ testing main non-free contrib

# Security updates for stable
# deb http://security.debian.org/ stable/updates main contrib

インストールに必要なLinuxヘッダーをインストールしたいと思います。Nvidiaドライバ

明らかに、テストに切り替えたときにLinuxヘッダーがインストールされていなかったので、私のカーネルは同じバージョンのままになりました(家庭)。 4.9.0-3-amd64でしたが、今は4.11.0-1-amd64です。利用可能な項目を確認した後、4.11.0-1-amd64をインストールしました。

~$ apt-cache search linux-image
linux-headers-4.11.0-1-amd64 - Header files for Linux 4.11.0-1-amd64
linux-headers-4.11.0-1-rt-amd64 - Header files for Linux 4.11.0-1-rt-amd64
linux-image-4.11.0-1-amd64 - Linux 4.11 for 64-bit PCs
linux-image-4.11.0-1-amd64-dbg - Debug symbols for linux-image-4.11.0-1-amd64
linux-image-4.11.0-1-rt-amd64 - Linux 4.11 for 64-bit PCs, PREEMPT_RT
linux-image-4.11.0-1-rt-amd64-dbg - Debug symbols for linux-image-4.11.0-1-rt-amd64
linux-image-4.9.0-3-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-3-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT

次に、次のように実行してヘッダーをインストールしたいと思います。

~$ sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 linux-headers-amd64 : Depends: linux-headers-4.9.0-3-amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.

満たされていない依存関係があると文句を言います。メタヘッダーパッケージをどのようにインストールしますか?

PS:私が確認したときLinuxヘッダー-AMD64それはlinux-headers-に依存すると言います。4.9.0-3-amd64。しかし、古いカーネル(Linux-イメージ-4.9.0-3-amd64)また、同じ満たされていない依存関係について文句を言います!

ベストアンサー1

私も同じ問題を抱えています。4.9.0-3最近のアップデートを実行してXサーバーを破損しました(テキストコンソールに移動しました)。

nVidiaモジュールがロードされていないことを発見して再コンパイルしてみました。その後、カーネルヘッダファイルが見つからないことがわかりました。

linux-image-4.11.0-1-all私の解決策は、適切なヘッダーを使用してインストールすることでした。新しいカーネルで再起動した後、nVidiaカーネルモジュールを再コンパイルしました。現在、次のパッケージがインストールされています。

linux-headers-4.11.0-1-all
linux-headers-4.11.0-1-all-amd64
linux-headers-4.11.0-1-amd64
linux-headers-4.11.0-1-common
linux-headers-4.11.0-1-common-rt
linux-headers-4.11.0-1-rt-amd64

これが問題を解決する方法です。linux-headers-amd64インストールすると、インストールしない以外は競合回避策が提供されないため、ここでパッケージストアにエラーが表示されます。特にZFSカーネルモジュールもインストールに失敗したため、私はこの問題を解決するためのアップデートを待っています。

おすすめ記事