PDA

View Full Version : Unable to locate package linux-headers-4.18.0-kali2-amd64



NomanProdhan
2018-12-13, 20:48
Hello there
I have just installed VirtualBox on may Kali Linux machine. After installing it showing below error


The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT



I have tried to install linux-headers by using
apt-get install linux-headers-amd64 linux-headers-4.18.0-kali2-amd64 but its showing below error

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.18.0-kali2-amd64
E: Couldn't find any package by glob 'linux-headers-4.18.0-kali2-amd64'
E: Couldn't find any package by regex 'linux-headers-4.18.0-kali2-amd64'


I have removed virtualbox and tried to install it with command

apt-get install virtualbox and also tried

apt-get install virtualbox virtualbox-dkms

But still getting same error.

I have tried to run this command

modprobe vboxdrv
and its showing

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.18.0-kali2-amd64


I have also tried this command

/dev/vboxdrv setup

and its showing

bash: /dev/vboxdrv: No such file or directory

I have searched for linux headers by using this command

apt-cache search linux-headers
and its giving me this output

aufs-dkms - DKMS files to build and install aufs
linux-headers-4.18.0-kali3-all - All header files for Linux 4.18 (meta-package)
linux-headers-4.18.0-kali3-all-amd64 - All header files for Linux 4.18 (meta-package)
linux-headers-4.18.0-kali3-amd64 - Header files for Linux 4.18.0-kali3-amd64
linux-headers-4.18.0-kali3-cloud-amd64 - Header files for Linux 4.18.0-kali3-cloud-amd64
linux-headers-4.18.0-kali3-common - Common header files for Linux 4.18.0-kali3
linux-headers-4.18.0-kali3-common-rt - Common header files for Linux 4.18.0-kali3-rt
linux-headers-4.18.0-kali3-rt-amd64 - Header files for Linux 4.18.0-kali3-rt-amd64
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
linux-headers-cloud-amd64 - Header files for Linux cloud-amd64 configuration (meta-package)
linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-amd64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-i386-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpcspe-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-riscv64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-x32-cross - Linux Kernel Headers for development (for cross-compiling)
linux-headers-4.18.0-kali3-686 - Header files for Linux 4.18.0-kali3-686
linux-headers-4.18.0-kali3-686-pae - Header files for Linux 4.18.0-kali3-686-pae
linux-headers-4.18.0-kali3-all-i386 - All header files for Linux 4.18 (meta-package)
linux-headers-4.18.0-kali3-rt-686-pae - Header files for Linux 4.18.0-kali3-rt-686-pae
linux-headers-686 - Header files for Linux 686 configuration (meta-package)
linux-headers-686-pae - Header files for Linux 686-pae configuration (meta-package)
linux-headers-rt-686-pae - Header files for Linux rt-686-pae configuration (meta-package)


I couldn't find llinux-header for 4.18.0-kali2-amd64

Output of the command uname -a is

Linux kali 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux


Output of the command grep VERSION /etc/os-release


VERSION="2019.1"
VERSION_ID="2019.1"


I have just installed the linux yesterday and it was 2018.4 and was trying to solve the issue but couldn't And today its showing that its 2019.1 !! Don't know why ?

My /etc/apt/sources.list file content:


#

# deb cdrom:[Debian GNU/Linux 2018.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20181016-18:11]/ kali-last-snapshot contrib main non-free

#deb cdrom:[Debian GNU/Linux 2018.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20181016-18:11]/ kali-last-snapshot contrib main non-free

deb http://http.kali.org/kali kali-rolling main non-free contrib
#deb-src http://http.kali.org/kali kali-rolling main non-free contrib

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

I have also tried to upgrade linux headers and image

apt-get install linux-headers-4.18.0-kali3-amd64
apt-get install linux-image-4.18.0-kali3-amd64
After doing this I have reboot my system and it was not giving any output so I re install kali linux 2018.4 yesterday.


Nothing is working for me !

Any suggestion ? What should I do now ?

Mister_X
2018-12-14, 00:28
apt update && apt dist-upgrade
then reboot

NomanProdhan
2018-12-14, 08:45
apt update && apt dist-upgrade
then reboot

I have tried that it always showing below error

Get:1 http://ftp.yzu.edu.tw/Linux/kali kali-rolling/main amd64 libwine amd64 3.0.3-2 [20.8 MB]
Err:1 http://ftp.yzu.edu.tw/Linux/kali kali-rolling/main amd64 libwine amd64 3.0.3-2
Hash Sum mismatch
Hashes of expected file:
- SHA256:4caa41966d5982bb06c6c7f8f4ac65d57762f24bdf8 b06b7bfdeef679cc42116
- SHA1:271a0b7015002de5c74c67df7cf3d4082fd5da39 [weak]
- MD5Sum:1c40ca26841d16584bca3a14b502cacd [weak]
- Filesize:20773244 [weak]
Hashes of received file:
- SHA256:23bed6bc4e5a086605fafb018becf9cfb4181768a9d 0c49ae91ffa2badc4c71a
- SHA1:f0b199e071aa0d317d93a5a926c37d5596c65748 [weak]
- MD5Sum:69e79419390674241b055b139a193393 [weak]
- Filesize:20773244 [weak]
Last modification reported: Sat, 20 Oct 2018 06:02:22 +0000
Get:2 http://ftp.yzu.edu.tw/Linux/kali kali-rolling/main amd64 smartmontools amd64 6.6-1 [525 kB]
Err:2 http://ftp.yzu.edu.tw/Linux/kali kali-rolling/main amd64 smartmontools amd64 6.6-1
Hash Sum mismatch
Hashes of expected file:
- SHA256:149e71f891e134b3859ac81d215364c89a50d36b1e1 5d3be410a23f8abea6b99
- SHA1:b6147839cef4f759a3733397c5d7cbce46363360 [weak]
- MD5Sum:dd662c03bfbff836074f4e0bc01e70c0 [weak]
- Filesize:525400 [weak]
Hashes of received file:
- SHA256:11eeeab24a798474d8a0fa1c481fef524c20e89788d c53fd35cd20a4095e495f
- SHA1:52f0d6d9c623d6cebd27cd5428678b8c99be4d9c [weak]
- MD5Sum:618fcc38a8663cd691b26e808b665ee7 [weak]
- Filesize:525400 [weak]
Last modification reported: Sun, 21 Oct 2018 06:01:47 +0000
Fetched 21.3 MB in 43s (492 kB/s)
E: Failed to fetch http://ftp.yzu.edu.tw/Linux/kali/pool/main/w/wine/libwine_3.0.3-2_amd64.deb Hash Sum mismatch
Hashes of expected file:
- SHA256:4caa41966d5982bb06c6c7f8f4ac65d57762f24bdf8 b06b7bfdeef679cc42116
- SHA1:271a0b7015002de5c74c67df7cf3d4082fd5da39 [weak]
- MD5Sum:1c40ca26841d16584bca3a14b502cacd [weak]
- Filesize:20773244 [weak]
Hashes of received file:
- SHA256:23bed6bc4e5a086605fafb018becf9cfb4181768a9d 0c49ae91ffa2badc4c71a
- SHA1:f0b199e071aa0d317d93a5a926c37d5596c65748 [weak]
- MD5Sum:69e79419390674241b055b139a193393 [weak]
- Filesize:20773244 [weak]
Last modification reported: Sat, 20 Oct 2018 06:02:22 +0000
E: Failed to fetch http://ftp.yzu.edu.tw/Linux/kali/pool/main/s/smartmontools/smartmontools_6.6-1_amd64.deb Hash Sum mismatch
Hashes of expected file:
- SHA256:149e71f891e134b3859ac81d215364c89a50d36b1e1 5d3be410a23f8abea6b99
- SHA1:b6147839cef4f759a3733397c5d7cbce46363360 [weak]
- MD5Sum:dd662c03bfbff836074f4e0bc01e70c0 [weak]
- Filesize:525400 [weak]
Hashes of received file:
- SHA256:11eeeab24a798474d8a0fa1c481fef524c20e89788d c53fd35cd20a4095e495f
- SHA1:52f0d6d9c623d6cebd27cd5428678b8c99be4d9c [weak]
- MD5Sum:618fcc38a8663cd691b26e808b665ee7 [weak]
- Filesize:525400 [weak]
Last modification reported: Sun, 21 Oct 2018 06:01:47 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?



Updated :
When I put

deb https://http.kali.org/kali kali-rolling main non-free contrib
in my sources.list file the error doesn't appear. But I am not sure if its good or bad to use https !!

Mister_X
2018-12-14, 16:39
it's not bad to use https, it adds another layer of security.

However, when you change sources.list, you need to run "apt update" (to update the list of packages).

NomanProdhan
2018-12-14, 16:44
it's not bad to use https, it adds another layer of security.

However, when you change sources.list, you need to run "apt update" (to update the list of packages).

Yup, I got that. But the thing is, my system was not working after dist-upgrade. I mean it was not turning on and that is why I have removed the linux-image.
Any other solution ??

NomanProdhan
2018-12-14, 20:31
Problem solved.
How ?
I have tried dist-upgrade but it was not working. So I have downloaded and installed linux-headers from here : http://mirror.internode.on.net/pub/kali/pool/main/l/linux/

Now everything is working fine :D
Just want to know if its safe to download linux-headers from other source ?

diegoaymar
2019-04-03, 05:18
Try this.

apt-get update && apt-get install linux-headers-$(uname -r) build-essential