
이 오류가 발생합니다.
Makefile:181: *** 오류: 현재 Linux 커널의 소스를 찾을 수 없습니다. KERN_DIR=을 지정하고 Make를 다시 실행하십시오. 멈추다.
기본적으로 나는하고 있습니다 :
$ sudo /etc/init.d/vboxdrv setup
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-573.18.1.el6.x86_64
Building the main Guest Additions module [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
오류는 다음과 같습니다.
Makefile:181: *** 오류: 현재 Linux 커널의 소스를 찾을 수 없습니다. KERN_DIR=을 지정하고 Make를 다시 실행하십시오. 멈추다
이 오류는 무엇이며 어떻게 해결합니까?
답변1
커널 헤더 패키지를 설치했는지 확인하세요.
http://www.cyberciti.biz/faq/howto-install-kernel-headers-package
Make sure you have updated version
Type the following command
$ sudo apt-get update
OR as root user enter:
# apt-get update
Search for kernel version (optional)
Type the following command:
$ apt-cache search linux-headers-$(uname -r)
Install linux-header package under Debina or Ubuntu Linux
Type the following command:
$ sudo apt-get install linux-headers-$(uname -r)
OR as root user:
# apt-get install linux-headers-$(uname -r)
편집하다:
내 서버에도 설치해야 하는데 데비안 저장소에서 virtualbox를 사용하려고 할 때 동일한 오류가 발생했습니다. 계속해서 VirtualBox 저장소를 추가하고 거기에서 설치했습니다. 더 최신이기 때문에 더 좋습니다.
루트로
$ nano /etc/apt/sources.list
아래에 줄을 추가하여 압착하세요.
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
그런 다음 apt-secure에 대한 Oracle 공개 키를 추가하십시오.
$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
그런 다음 업데이트를 실행하고 최신 4.2를 설치하십시오.
apt-get update
apt-get install virtualbox-4.2
VirtualBox 호스트 커널 모듈이 최신 상태인지 확인하려면 dkms 패키지를 설치하십시오.
apt-get install dkms
가보는 것이 좋을 것 같습니다. Linux용 VirtualBox 웹사이트에서 이러한 지침을 얻었는데 현재 다운된 것으로 보이지만 링크는 다음과 같습니다.https://www.virtualbox.org/wiki/Linux_Downloads
답변2
Fedora/CentOS에서 이 문제를 해결하는 방법
먼저 설치된 패키지(특히 커널)가 최신인지 확인하세요.
$ sudo yum update
uname -r
커널 버전 이 업데이트되면 다시 시작해야 하므로 /usr/src/kernels/
. 그 다음에
$ sudo yum install kernel-devel gcc
$ echo export KERN_DIR=/usr/src/kernels/`uname -r` >> ~/.bashrc
$ source ~/.bashrc # to set the variable in your current shell
$ sudo echo $KERN_DIR # verify the value is set
$ sudo ls $KERN_DIR # verify the directory exists
이 컴파일 후에는 VirtualBox 커널 모듈이 아무런 문제 없이 작동할 것입니다.
출처:
답변3
linux-headers
@hhh 귀하의 아키텍처에 적합한 것만 검색하고 찾아야 합니다 . 나의 경우에는:
# aptitude search linux-headers
v linux-headers -
p linux-headers-2.6-amd64 - Header files for Linux amd64 configuration (dummy package)
p linux-headers-3.2.0-4-all - All header files for Linux 3.2 (meta-package)
p linux-headers-3.2.0-4-all-amd64 - All header files for Linux 3.2 (meta-package)
i A linux-headers-3.2.0-4-amd64 - Header files for Linux 3.2.0-4-amd64
i A linux-headers-3.2.0-4-common - Common header files for Linux 3.2.0-4
p linux-headers-3.2.0-4-common-rt - Common header files for Linux 3.2.0-4-rt
p linux-headers-3.2.0-4-rt-amd64 - Header files for Linux 3.2.0-4-rt-amd64
i linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
p linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
그래서 제 경우에는 64비트 아키텍처를 사용하고 있으므로 linux-headers-amd64
.
또 다른 것은 apt-get add
존재하지 않는다는 것입니다. apt-get
로 교체하세요 apt-key
.
답변4
노력하다:
yum install kernel* dkms gcc
그 다음에
yum install kernel-uek-devel
그런 다음 컴퓨터를 재부팅하십시오.