web-dev-qa-db-ja.com

カーネルヘッダーとカーネル開発

コマンド

rpm -qa | grep kernel

出力

kernel-3.10.0-514.16.1.el7.x86_64

kernel-tools-libs-3.10.0-514.16.1.el7.x86_64

kernel-headers-3.10.0-862.9.1.el7.x86_64

kernel-devel-3.10.0-862.9.1.el7.x86_64

kernel-tools-3.10.0-514.16.1.el7.x86_64

コマンド

ウナメ-r

出力

3.10.0-514.16.1.el7.x86_64

対応するdevelをインストールしようとしています:

Sudo yum install http://vault.centos.org/7.3.1611/updates/x86_64/Packages/kernel-devel-3.10.0-514.16.1.el7.x86_64.rpm

私は得る:

  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/rt-tester/rt-tester.pyo from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/selinux/genheaders/genheaders from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/selinux/mdp/mdp from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/sortextable from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/sortextable.c from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/sortextable.h from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/tags.sh from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/tracing/draw_functrace.pyc from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/tracing/draw_functrace.pyo from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/scripts/unifdef from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/build/Makefile.feature from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/build/Makefile.include from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/scripts/Makefile.include from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/objtool/objtool from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/perf/Makefile.perf from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/tools/scripts/Makefile.Arch from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64
  file /usr/src/kernels/3.10.0-514.16.1.el7.x86_64/vmlinux.id from install of kernel-devel-3.10.0-514.16.1.el7.x86_64 conflicts with file from package kernel-devel-3.10.0-862.9.1.el7.x86_64

Error Summary

これが私たちの本番サーバーです。これを安全に解決するにはどうすればよいですか?

走れば

Sudo yum install kernel-headers

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.excellmedia.net

 * extras: centos.excellmedia.net

 * updates: centos.excellmedia.net

Package kernel-headers-3.10.0-862.9.1.el7.x86_64 already installed and latest version

Nothing to do

Sudo yum install kernel-devel

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.excellmedia.net

 * extras: centos.excellmedia.net

 * updates: centos.excellmedia.net

Package kernel-devel-3.10.0-862.9.1.el7.x86_64 already installed and latest version

何もしません

2
Simran kaur

カーネル開発をインストールするには、次のコマンドを実行します。

_yum install kernel-devel-3.10.0-514.16.1.el7.x86_64_ OR yum install kernel-devel-$(uname -r)

カーネルヘッダーをインストールするには、次のコマンドを実行します。

_yum install kernel-headers-3.10.0-514.16.1.el7.x86_64_ OR yum install kernel-headers-$(uname -r)

1
karthik