# [Solved]Can't modprobe (KVM) modules, invalid format

## Letharion

[edit]Problem was KVM and kernel had been compiled with different versions of GCC. Recompiling with the same GCC solved the problem[/edit]

```
make clean && make && make modules_install

cp arch/i386/boot/bzImage /boot/kernelsomething

update grub

reboot

localhost letharion # modprobe kvm

FATAL: Error inserting kvm (/lib/modules/2.6.27-gentoo-r8/kvm/kvm.ko): Invalid module format

```

```
localhost letharion # ls -l /usr/src

lrwxrwxrwx  1 root root   22 2009-02-02 15:45 linux -> linux-2.6.27-gentoo-r8

drwxr-xr-x 23 root root 4096 2009-02-11 12:37 linux-2.6.27-gentoo-r8

```

I would have assumed it was "that easy" to load a module, but obviously not. What did I miss?

Built in they work well.Last edited by Letharion on Wed Feb 11, 2009 3:02 pm; edited 2 times in total

----------

## bbgermany

did you use the same compilerversion for the kernel and the modules?

check dmesg and your /var/log/messages for this:

 *dmesg wrote:*   

> 
> 
> [    0.000000] Linux version 2.6.21-xen (root@zeus) (gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1) ) #6 SMP Wed Sep 17 14:10:14 CEST 2008
> 
> 

 

The compiler versions must be the same.

bb

----------

## Letharion

Ofc, that was it. Thank you  :Smile: 

----------

