Thanks for the reply but i forgot to mention that this command is not working for me throwing some error:
So i already tried that solution but no luckapt-get install -y linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.15.0-kali2-amd64
E: Couldn't find any package by glob 'linux-headers-4.15.0-kali2-amd64'
E: Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'