CentOS 가상 머신에 커널 개발 설치

CentOS 가상 머신에 커널 개발 설치

Mac OS 호스트의 CentOS VM에 Parallels 도구를 설치하려고 했는데 다음 오류 메시지가 표시되었습니다.

An error occurred while installing the following packages:  │         
        │ - kernel-devel-2.6.32-279.14.1.el6.i686                     │         
        │ - dkms                                                      │         
        │                                                             │         
        │ Install these packages manually and start the Parallels     │         
        │ Tools installation again. 

설치하려고 했는데 dkms오류 메시지가 표시되었습니다.

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.dhakacom.com
 * extras: mirror.dhakacom.com
 * updates: mirror.dhakacom.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.4.0-1.20170926git959bd74.el6 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.4.0-1.20170926git959bd74.el6.noarch
--> Running transaction check
---> Package elfutils-libelf-devel.i686 0:0.164-2.el6 will be installed
--> Processing Dependency: elfutils-libelf(x86-32) = 0.164-2.el6 for package: elfutils-libelf-devel-0.164-2.el6.i686
--> Running transaction check
---> Package elfutils-libelf.i686 0:0.152-1.el6 will be updated
--> Processing Dependency: elfutils-libelf(x86-32) = 0.152-1.el6 for package: elfutils-libs-0.152-1.el6.i686
--> Processing Dependency: elfutils-libelf(x86-32) = 0.152-1.el6 for package: elfutils-0.152-1.el6.i686
---> Package elfutils-libelf.i686 0:0.164-2.el6 will be an update
--> Running transaction check
---> Package elfutils.i686 0:0.152-1.el6 will be updated
---> Package elfutils.i686 0:0.164-2.el6 will be an update
---> Package elfutils-libs.i686 0:0.152-1.el6 will be updated
---> Package elfutils-libs.i686 0:0.164-2.el6 will be an update
--> Processing Dependency: libz.so.1(ZLIB_1.2.2.3) for package: elfutils-libs-0.164-2.el6.i686
--> Running transaction check
---> Package zlib.i686 0:1.2.3-27.el6 will be updated
--> Processing Dependency: zlib = 1.2.3-27.el6 for package: zlib-devel-1.2.3-27.el6.i686
---> Package zlib.i686 0:1.2.3-29.el6 will be an update
--> Running transaction check
---> Package zlib-devel.i686 0:1.2.3-27.el6 will be updated
---> Package zlib-devel.i686 0:1.2.3-29.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch     Version                          Repository
                                                                           Size
================================================================================
Installing:
 dkms                    noarch   2.4.0-1.20170926git959bd74.el6   epel    78 k
Installing for dependencies:
 elfutils-libelf-devel   i686     0.164-2.el6                      base    32 k
Updating for dependencies:
 elfutils                i686     0.164-2.el6                      base   255 k
 elfutils-libelf         i686     0.164-2.el6                      base   204 k
 elfutils-libs           i686     0.164-2.el6                      base   251 k
 zlib                    i686     1.2.3-29.el6                     base    73 k
 zlib-devel              i686     1.2.3-29.el6                     base    44 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       5 Package(s)

Total download size: 936 k
Is this ok [y/N]: y
Downloading Packages:
http://download.fedoraproject.org/pub/epel/6/i386/Packages/d/dkms-2.4.0-1.20170926git959bd74.el6.noarch.rpm: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
(2/7): elfutils-0.164-2.el6.i686.rpm                     | 255 kB     00:00     
(3/7): elfutils-libelf-0.164-2.el6.i686.rpm              | 204 kB     00:00     
(4/7): elfutils-libelf-devel-0.164-2.el6.i686.rpm        |  32 kB     00:00     
(5/7): elfutils-libs-0.164-2.el6.i686.rpm                | 251 kB     00:00     
(6/7): zlib-1.2.3-29.el6.i686.rpm                        |  73 kB     00:00     
(7/7): zlib-devel-1.2.3-29.el6.i686.rpm                  |  44 kB     00:00     


Error Downloading Packages:
  dkms-2.4.0-1.20170926git959bd74.el6.noarch: failure: Packages/d/dkms-2.4.0-1.20170926git959bd74.el6.noarch.rpm from epel: [Errno 256] No more mirrors to try.

그 후 설치를 시도했는데 kernel-devel-2.6.32-279.14.1.el6.i686다음 yum과 같은 오류 메시지가 나타납니다.

$ yum install kernel-devel-2.6.32-279.14.1.el6.i686

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.dhakacom.com
 * extras: mirror.dhakacom.com
 * updates: mirror.dhakacom.com
Setting up Install Process
No package kernel-devel-2.6.32-279.14.1.el6.i686 available.
Error: Nothing to do

명확히 말하면 두 인스턴스 모두 설치에 성공하지 못했습니다. 그런 다음 나는 달려간다.

$ yum install kernel-headers그런 다음 dkms앞서 언급한 명령을 사용하여 설치할 수 있습니다.

그런 다음 가상 머신에 설치된 커널 개발 버전을 확인하고,

$ yum list kernel-devel

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.dhakacom.com
 * extras: mirror.dhakacom.com
 * updates: mirror.dhakacom.com
Installed Packages
kernel-devel.i686                  2.6.32-754.2.1.el6                   @updates

kernel-devel-2.6.32-279.14.1.el6.i686그렇다면 CentOS 시스템에 설치하는 방법은 무엇입니까? 저는 리눅스에 대한 경험이 별로 없어서 틀린 부분이 있으면 알려주세요.

관련 정보