LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux-headers package on a VPS? (Couldn't find package) (http://www.linuxquestions.org/questions/linux-newbie-8/linux-headers-package-on-a-vps-couldnt-find-package-717128/)

FEL 04-06-2009 06:10 AM

linux-headers package on a VPS? (Couldn't find package)
 
Hello,

I would like to install Virtualbox or VMWare on a VPS that is currently running Debian Etch. As expected, Virtualbox needed to compile the kernel modules. This is where I got stuck.

Code:

$ * No suitable module for running kernel found
$ uname -r
2.6.18-92.1.13.el5.028stab059.6
$ apt-get install linux-headers-2.6.18-92.1.13.el5.028stab059.6
E: Couldn't find package linux-headers-2.6.18-92.1.13.el5.028stab059.6

So, how should one go about obtaining the sources for this system?

Regards,

Thomas

bathory 04-06-2009 06:41 AM

You can use:
Code:

apt-cache search kernel-image | grep 2.6
apt-get kernel-image-2.x.x

to search and install the kernel image that suits your kernel.

FEL 04-06-2009 06:54 AM

Ok,

Since this isn't my system per se I'm not exactly sure which kernel that suits it. The system was pre-installed when it was given to me. I'm not 100% sure the following information is relevant in the matter, but just in case:

Code:

$ apt-cache search kernel-image | grep 2.6
kernel-image-2.6-386 - Linux 2.6 image on 486-class - transition package
kernel-image-2.6-686 - Linux 2.6 image on PPro/Celeron/PII/PIII/P4 - transition package
kernel-image-2.6-686-smp - Linux 2.6 image on PPro/Celeron/PII/PIII/P4 SMP - transition package
kernel-image-2.6-amd64-generic - Linux kernel image for version 2.6 on generic x86_64 systems - transition package
kernel-image-2.6-amd64-k8 - Linux kernel image for version 2.6 on AMD64 systems - transition package
kernel-image-2.6-amd64-k8-smp - Linux kernel image for version 2.6 on AMD64 SMP systems - transition package
kernel-image-2.6-em64t-p4 - Linux kernel image for version 2.6 on Intel EM64T systems - transition package
kernel-image-2.6-em64t-p4-smp - Linux kernel image for version 2.6 on Intel EM64T SMP systems - transition package
kernel-image-2.6-k7 - Linux 2.6 image on AMD K7 - transition package
kernel-image-2.6-k7-smp - Linux 2.6 image on AMD K7 SMP - transition package

$ cat /proc/cpuinfo
processor      : [0-7]
vendor_id      : GenuineIntel
cpu family      : 6
model          : 23
model name      : Intel(R) Xeon(R) CPU          E5405  @ 2.00GHz
stepping        : 10
cpu MHz        : 750.028
cache size      : 6144 KB
physical id    : 0
siblings        : 4
core id        : 0
cpu cores      : 4
fpu            : yes
fpu_exception  : yes
cpuid level    : 13
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips        : 4003.06
clflush size    : 64
cache_alignment : 64
address sizes  : 38 bits physical, 48 bits virtual
power management:

Further directions on which kernel source to install would be greatly appreciated.

AlucardZero 04-06-2009 07:41 AM

el5? That sounds like a RedHat kernel, not a Debian.

bathory was mistaken, you want just the headers, not a new kernel, right? Try linux-headers-2.6.18-6 .. though you may need to switch to a Debian kernel as I am not sure that it will work.

FEL 04-06-2009 07:57 AM

Redhat? Weird ...

Code:

$ cat /etc/issue
Debian GNU/Linux 4.0

I tried:
Code:

$ apt-get install linux-headers-2.6.18-6
[...]
Setting up linux-headers-2.6.18-6 (2.6.18.dfsg.1-24) ...

But Virtualbox still could not find a suitable module for the kernel:
Code:

$ /etc/init.d/vboxdrv setup
Recompiling VirtualBox kernel module:
* Look at /var/log/vbox-install.log to find out what went wrong

cat /var/log/vbox-install.log
Makefile:143: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

$ export KERN_DIR="/usr/src/linux-headers-2.6.18-6/"

Now I get a new error when trying to setup vboxdrv:
Code:

Makefile:181: *** Unable to find the folder to install the support driver to.  Stop.
Perhaps this is where I head on over to the Virtualbox support forum? :)

bathory 04-06-2009 08:25 AM

In fact
Quote:

$ uname -r
2.6.18-92.1.13.el5.028stab059.6
is a CentOS kernel. I guess the real server in running on Debian and the VPS is from openvz that uses CentOS.

FEL 04-06-2009 08:34 AM

Ok,

Although I'm not quite sure how to use that information. I tried:
Code:

$ wget ftp://ftp.sunet.se/pub/os/Linux/distributions/centos/5.2/updates/i386/RPMS/kernel-headers-2.6.18-92.1.13.el5.i386.rpm
$ alien kernel-headers-2.6.18-92.1.13.el5.i386.rpm
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
warning: kernel-headers-2.6.18-92.1.13.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
hostname: Unknown host
hostname: Unknown host
kernel-headers_2.6.18-93.1_i386.deb generated

$ dpkg -i kernel-headers_2.6.18-93.1_i386.deb
Selecting previously deselected package kernel-headers.
(Reading database ... 19312 files and directories currently installed.)
Unpacking kernel-headers (from kernel-headers_2.6.18-93.1_i386.deb) ...
dpkg: error processing kernel-headers_2.6.18-93.1_i386.deb (--install):
 trying to overwrite `/usr/include/asm/mtrr.h', which is also in package linux-kernel-headers
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 kernel-headers_2.6.18-93.1_i386.deb


AlucardZero 04-06-2009 09:40 AM

Try removing linux-kernel-headers first? Be careful though, it may remove more than you'd like because of dependencies.

FEL 04-06-2009 12:45 PM

I removed linux-kernel-headers (and carefully noted which other packages that were uninstalled). After that I was able to install the .deb file I generated using alien earlier:

Code:

dpkg -i kernel-headers_2.6.18-93.1_i386.deb
[...]
Setting up kernel-headers (2.6.18-93.1) ...

But the Virtualbox kernel module still won't compile. Yet again it asks me to specify a KERN_DIR, which, this time around is rather tricky because I can't seem to find any linux-kernel-headers folder created by the newly installed .deb package.

Instead I extracted the .deb file to a directory which I specified as KERN_DIR. However, just as with the linux-headers-2.6.18-6 package, the result when trying to setup vboxdrv is:

Code:

Makefile:181: *** Unable to find the folder to install the support driver to.  Stop.


All times are GMT -5. The time now is 12:00 PM.