OpenVZ mismatched kernel and dev when compiling.

./configure: line 91: cd: /lib/modules/2.6.32-042stab084.25/build: No such file or directory

Error: kernel version not found.
Please make sure your kernel is configured.

dr-xr-xr-x.  4 root root   4096 Feb 21 06:13 ..
lrwxrwxrwx   1 root root     45 Feb 21 06:13 build -> ../../../usr/src/kernels/2.6.32-042stab084.25
drwxr-xr-x   2 root root   4096 Feb 12 20:18 extra
drwxr-xr-x  11 root root   4096 Feb 21 06:13 kernel
-rw-r--r--   1 root root 567702 Feb 21 06:15 modules.alias
-rw-r--r--   1 root root 547061 Feb 21 06:15 modules.alias.bin
-rw-r--r--   1 root root   1376 Feb 12 20:19 modules.block
-rw-r--r--   1 root root     69 Feb 21 06:15 modules.ccwmap
-rw-r--r--   1 root root 198500 Feb 21 06:15 modules.dep
-rw-r--r--   1 root root 289392 Feb 21 06:15 modules.dep.bin
-rw-r--r--   1 root root     68 Feb 12 20:19 modules.drm
-rw-r--r--   1 root root    665 Feb 21 06:15 modules.ieee1394map
-rw-r--r--   1 root root    141 Feb 21 06:15 modules.inputmap
-rw-r--r--   1 root root   1775 Feb 21 06:15 modules.isapnpmap
-rw-r--r--   1 root root     29 Feb 12 20:19 modules.modesetting
-rw-r--r--   1 root root   1929 Feb 12 20:19 modules.networking
-rw-r--r--   1 root root     74 Feb 21 06:15 modules.ofmap
-rw-r--r--   1 root root  75547 Feb 12 20:17 modules.order
-rw-r--r--   1 root root 405413 Feb 21 06:15 modules.pcimap
-rw-r--r--   1 root root   6259 Feb 21 06:15 modules.seriomap
-rw-r--r--   1 root root 220302 Feb 21 06:15 modules.symbols
-rw-r--r--   1 root root 280714 Feb 21 06:15 modules.symbols.bin
-rw-r--r--   1 root root 837314 Feb 21 06:15 modules.usbmap
lrwxrwxrwx   1 root root      5 Feb 21 06:13 source -> build
drwxr-xr-x   2 root root   4096 Feb 12 20:18 updates
drwxr-xr-x   2 root root   4096 Feb 21 06:13 vdso
drwxr-xr-x   2 root root   4096 Feb 12 20:18 weak-updates
[root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-
2.6.32-042stab084.26/  2.6.32-431.el6.x86_64/
[root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-042stab084.26/
arch   c rypto   firmware  include  ipc     lib       Makefile.common  Module.symvers  samples  security  usr
block  drivers  fs        init     kernel  Makefile  mm               net             scripts  sound     tools       virt
[root@testbox 2.6.32-042stab084.25]# ls
build          modules.alias.bin  modules.dep.bin      modules.isapnpmap    modules.order     modules.symbols.bin  vdso
extra          modules.block      modules.drm          modules.modesetting  modules.pcimap    modules.usbmap       weak-updates
kernel         modules.ccwmap     modules.ieee1394map  modules.networking   modules.seriomap  source
modules.alias  modules.dep        modules.inputmap     modules.ofmap        modules.symbols   updates
[root@testbox 2.6.32-042stab084.25]# ls ../../../usr/src/kernels/2.6.32-042stab084.25
ls: cannot access ../../../usr/src/kernels/2.6.32-042stab084.25: No such file or directory

Linux testbox 2.6.32-042stab084.25 #1 SMP Wed Feb 12 16:04:42 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@testbox 2.6.32-042stab084.25]# ls /boot/grub/     fat_stage1_5  grub.conf         jfs_stage1_5  minix_stage1_5     splash.xpm.gz  stage2         vstafs_stage1_5
e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage1         ufs2_stage1_5  xfs_stage1_5
[root@testbox 2.6.32-042stab084.25]# ls /boot/grub/^C
[root@testbox 2.6.32-042stab084.25]# ls /boot/
config-2.6.32-042stab084.25   initramfs-2.6.32-042stab084.25.img     symvers-2.6.32-042stab084.25.gz   vmlinuz-2.6.32-042stab084.25
config-2.6.32-431.el6.x86_64  initramfs-2.6.32-431.el6.x86_64.img    symvers-2.6.32-431.el6.x86_64.gz  vmlinuz-2.6.32-431.el6.x86_64
efi                           initrd-2.6.32-042stab084.25kdump.img
grub                          initrd-2.6.32-431.el6.x86_64kdump.img
[root@testbox 2.6.32-042stab084.25]# rpm -aq|grep vzkernel
[root@testbox 2.6.32-042stab084.25]# yum -y install vzkernel-2.6.32-042stab084.25.x86_64
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * openvz-kernel-rhel6:

yum installed the wrong version, the devel does not match the actual running kernel!


openvz, mismatched, kernel, dev, compiling, configure, lib, modules, directory, configured, xr, feb, lrwxrwxrwx, usr, src, kernels, drwxr, rw, alias, bin, ccwmap, dep, drm, ieee, inputmap, isapnpmap, modesetting, networking, ofmap, pcimap, seriomap, symbols, usbmap, updates, vdso, testbox, ls, _, rypto, firmware, ipc, makefile, module, symvers, drivers, fs, init, scripts, virt, linux, smp, wed, msk, gnu, grub, fat_stage, conf, jfs_stage, minix_stage, splash, xpm, gz, vstafs_stage, fs_stage, ffs_stage, iso, _stage, lst, reiserfs_stage, ufs, xfs_stage, config, initramfs, img, vmlinuz, efi, initrd, kdump, rpm, aq, grep, vzkernel, devel, yum, install, plugins, fastestmirror, loading, speeds, cached, hostfile, mirrors, hustunique, extras, edu, cn, rhel, ftp, iij, jp, installed,

Latest Articles

  • Ubuntu Debian Linux Cannot Install Wine Solution - wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu14.2) but it is not installable wine1.4 : Depends: wine1.6 but it is not going to be installed
  • How To Install python 3.4 3.5 and up on Linux with wine - Working Solution
  • using Xvfb on virtual remote ssh server to have X graphical programs work
  • ssh Received disconnect from port 22:2: Too many authentication failures
  • named bind errors - DNSKEY: unable to find a DNSKEY which verifies the DNSKEY RRset and also matches a trusted key for '.'
  • OpenVZ vs LXC DIR mode poor security in LXC
  • httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load modules/ into server: /lib64/ symbol __h_errno, version GLIBC_PRIVATE not defined in file libc.s
  • Radeon R3 GPU on Debian Crashing
  • MySQL 5.7 on Debian and Ubuntu - How To Reset Root Password
  • SSH and sshfs timeout settings keepalive
  • Linux How To Add User To Additional Group
  • Howto Set Static IP on boot in initramfs for dropbear or other purposes NFS, Linux, Debian, Ubuntu, CentOS
  • Convert and install to LUKS Encrypted Drive Ubuntu 18.04 19.10 Linux Mint and Debian Based Linux
  • Debian and Netplan
  • CentOS 8 how to restart the network!
  • CentOS 8 how to convert to a bootable mdadm RAID software array
  • ADATA USB Thumb Drive Issues
  • KMODE EXCEPTION NOT HANDLED - QEMU/KVM Won't Boot Windows 2016 or 10 Image or Physical Machine
  • Linux Mint / Ubuntu / Debian Mate Disable Guest Session and Hide Usernames on Lightdm Login screen GUI
  • SSH How To Create Public/Private Key Pair and with a Larger Keysize than 2048 bits