How to install guest additions on Kali Linux 4.15.0

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I've installed the latest version of Kali Linux using virtualbox but I can't install guest additions, I found this question.



After uname -r command I have in my terminal:



4.15.0-kali2-amd64


And when I try to install linux-headers executing apt-get install linux-headers-$(uname -r) command I have the following errors:



Unable to locate package linux-headers-4.15.0-kali2-amd64
Couldn't find any package by global 'linux-headers-4.15.0-kali2-amd64'
Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'


For comparison I've installed Ubuntu on Virtualbox and it is working fine.



Please tell me what can I do in this case?










share|improve this question



















  • 2




    Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
    – Stephen Kitt
    Aug 26 at 9:21










  • @StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
    – Rui F Ribeiro
    Aug 26 at 9:24















up vote
1
down vote

favorite












I've installed the latest version of Kali Linux using virtualbox but I can't install guest additions, I found this question.



After uname -r command I have in my terminal:



4.15.0-kali2-amd64


And when I try to install linux-headers executing apt-get install linux-headers-$(uname -r) command I have the following errors:



Unable to locate package linux-headers-4.15.0-kali2-amd64
Couldn't find any package by global 'linux-headers-4.15.0-kali2-amd64'
Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'


For comparison I've installed Ubuntu on Virtualbox and it is working fine.



Please tell me what can I do in this case?










share|improve this question



















  • 2




    Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
    – Stephen Kitt
    Aug 26 at 9:21










  • @StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
    – Rui F Ribeiro
    Aug 26 at 9:24













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I've installed the latest version of Kali Linux using virtualbox but I can't install guest additions, I found this question.



After uname -r command I have in my terminal:



4.15.0-kali2-amd64


And when I try to install linux-headers executing apt-get install linux-headers-$(uname -r) command I have the following errors:



Unable to locate package linux-headers-4.15.0-kali2-amd64
Couldn't find any package by global 'linux-headers-4.15.0-kali2-amd64'
Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'


For comparison I've installed Ubuntu on Virtualbox and it is working fine.



Please tell me what can I do in this case?










share|improve this question















I've installed the latest version of Kali Linux using virtualbox but I can't install guest additions, I found this question.



After uname -r command I have in my terminal:



4.15.0-kali2-amd64


And when I try to install linux-headers executing apt-get install linux-headers-$(uname -r) command I have the following errors:



Unable to locate package linux-headers-4.15.0-kali2-amd64
Couldn't find any package by global 'linux-headers-4.15.0-kali2-amd64'
Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'


For comparison I've installed Ubuntu on Virtualbox and it is working fine.



Please tell me what can I do in this case?







kali-linux virtualbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 at 9:25









GAD3R

22.9k164895




22.9k164895










asked Aug 26 at 8:14









Uladzimir Khadakouski

1086




1086







  • 2




    Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
    – Stephen Kitt
    Aug 26 at 9:21










  • @StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
    – Rui F Ribeiro
    Aug 26 at 9:24













  • 2




    Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
    – Stephen Kitt
    Aug 26 at 9:21










  • @StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
    – Rui F Ribeiro
    Aug 26 at 9:24








2




2




Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
– Stephen Kitt
Aug 26 at 9:21




Kudos on that edit @Rui, I much prefer that over linking to the usual Q&A ;-)
– Stephen Kitt
Aug 26 at 9:21












@StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
– Rui F Ribeiro
Aug 26 at 9:24





@StephenKitt I have my honest doubts this question seen from a broader angle has not been asked before. However, it is a waste to close a well written question with a good answer.
– Rui F Ribeiro
Aug 26 at 9:24











2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted










Your kernel is out-of-date, and the corresponding kernel header packages are no longer available. You need to upgrade your system:



apt update
apt upgrade


then reboot your VM. This should give you the current kernel, 4.17.0-kali3 as I write this, and allow you to install the corresponding header packages.



To install the guest additions then, run the following command:



apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)





share|improve this answer






















  • I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
    – Uladzimir Khadakouski
    Aug 26 at 9:42






  • 1




    Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
    – Rui F Ribeiro
    Aug 26 at 9:46











  • Yes, I think there are several (real) dupes for this question...
    – Stephen Kitt
    Aug 26 at 10:52

















up vote
-3
down vote













When you run apt update and the kernel getting updated to a newer version. The command uname -r may takes the current older kernel version.



This mismatches between the updated kernel version and the old version the reason why it fails.



So to test: Do not update



  1. apt install linux-headers-$(uname -r)

  2. do not install the new headers

  3. run update and upgrade

  4. rerun apt install linux-headers-$(uname -r)

  5. error

  6. reboot

  7. rerun apt install linux-headers-$(uname -r)

  8. works..





share|improve this answer










New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • Welcome, The question is how to install the guest addition, not the linux-headers.
    – GAD3R
    2 days ago







  • 1




    It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
    – Jeff Schaller
    2 days ago






  • 1




    @JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
    – GAD3R
    yesterday









protected by GAD3R 2 days ago



Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



Would you like to answer one of these unanswered questions instead?














2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










Your kernel is out-of-date, and the corresponding kernel header packages are no longer available. You need to upgrade your system:



apt update
apt upgrade


then reboot your VM. This should give you the current kernel, 4.17.0-kali3 as I write this, and allow you to install the corresponding header packages.



To install the guest additions then, run the following command:



apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)





share|improve this answer






















  • I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
    – Uladzimir Khadakouski
    Aug 26 at 9:42






  • 1




    Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
    – Rui F Ribeiro
    Aug 26 at 9:46











  • Yes, I think there are several (real) dupes for this question...
    – Stephen Kitt
    Aug 26 at 10:52














up vote
3
down vote



accepted










Your kernel is out-of-date, and the corresponding kernel header packages are no longer available. You need to upgrade your system:



apt update
apt upgrade


then reboot your VM. This should give you the current kernel, 4.17.0-kali3 as I write this, and allow you to install the corresponding header packages.



To install the guest additions then, run the following command:



apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)





share|improve this answer






















  • I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
    – Uladzimir Khadakouski
    Aug 26 at 9:42






  • 1




    Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
    – Rui F Ribeiro
    Aug 26 at 9:46











  • Yes, I think there are several (real) dupes for this question...
    – Stephen Kitt
    Aug 26 at 10:52












up vote
3
down vote



accepted







up vote
3
down vote



accepted






Your kernel is out-of-date, and the corresponding kernel header packages are no longer available. You need to upgrade your system:



apt update
apt upgrade


then reboot your VM. This should give you the current kernel, 4.17.0-kali3 as I write this, and allow you to install the corresponding header packages.



To install the guest additions then, run the following command:



apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)





share|improve this answer














Your kernel is out-of-date, and the corresponding kernel header packages are no longer available. You need to upgrade your system:



apt update
apt upgrade


then reboot your VM. This should give you the current kernel, 4.17.0-kali3 as I write this, and allow you to install the corresponding header packages.



To install the guest additions then, run the following command:



apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)






share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 26 at 8:27

























answered Aug 26 at 8:21









Stephen Kitt

146k22321386




146k22321386











  • I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
    – Uladzimir Khadakouski
    Aug 26 at 9:42






  • 1




    Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
    – Rui F Ribeiro
    Aug 26 at 9:46











  • Yes, I think there are several (real) dupes for this question...
    – Stephen Kitt
    Aug 26 at 10:52
















  • I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
    – Uladzimir Khadakouski
    Aug 26 at 9:42






  • 1




    Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
    – Rui F Ribeiro
    Aug 26 at 9:46











  • Yes, I think there are several (real) dupes for this question...
    – Stephen Kitt
    Aug 26 at 10:52















I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
– Uladzimir Khadakouski
Aug 26 at 9:42




I don't know how and why but my /etc/apt/sources.list file was empty i just added "Couldn't find any package by regex 'linux-headers-4.15.0-kali2-amd64'" into this file and followed your steps in your answer and it is working fine for me. Thanks for your help!
– Uladzimir Khadakouski
Aug 26 at 9:42




1




1




Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
– Rui F Ribeiro
Aug 26 at 9:46





Stephen, We are having multiple instances of people having the sources.list empty. It might be more than clueless users, or a statistic anomaly, something is wrong. Which in turns makes that duplicatte having more sense where applicable.
– Rui F Ribeiro
Aug 26 at 9:46













Yes, I think there are several (real) dupes for this question...
– Stephen Kitt
Aug 26 at 10:52




Yes, I think there are several (real) dupes for this question...
– Stephen Kitt
Aug 26 at 10:52












up vote
-3
down vote













When you run apt update and the kernel getting updated to a newer version. The command uname -r may takes the current older kernel version.



This mismatches between the updated kernel version and the old version the reason why it fails.



So to test: Do not update



  1. apt install linux-headers-$(uname -r)

  2. do not install the new headers

  3. run update and upgrade

  4. rerun apt install linux-headers-$(uname -r)

  5. error

  6. reboot

  7. rerun apt install linux-headers-$(uname -r)

  8. works..





share|improve this answer










New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • Welcome, The question is how to install the guest addition, not the linux-headers.
    – GAD3R
    2 days ago







  • 1




    It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
    – Jeff Schaller
    2 days ago






  • 1




    @JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
    – GAD3R
    yesterday














up vote
-3
down vote













When you run apt update and the kernel getting updated to a newer version. The command uname -r may takes the current older kernel version.



This mismatches between the updated kernel version and the old version the reason why it fails.



So to test: Do not update



  1. apt install linux-headers-$(uname -r)

  2. do not install the new headers

  3. run update and upgrade

  4. rerun apt install linux-headers-$(uname -r)

  5. error

  6. reboot

  7. rerun apt install linux-headers-$(uname -r)

  8. works..





share|improve this answer










New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • Welcome, The question is how to install the guest addition, not the linux-headers.
    – GAD3R
    2 days ago







  • 1




    It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
    – Jeff Schaller
    2 days ago






  • 1




    @JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
    – GAD3R
    yesterday












up vote
-3
down vote










up vote
-3
down vote









When you run apt update and the kernel getting updated to a newer version. The command uname -r may takes the current older kernel version.



This mismatches between the updated kernel version and the old version the reason why it fails.



So to test: Do not update



  1. apt install linux-headers-$(uname -r)

  2. do not install the new headers

  3. run update and upgrade

  4. rerun apt install linux-headers-$(uname -r)

  5. error

  6. reboot

  7. rerun apt install linux-headers-$(uname -r)

  8. works..





share|improve this answer










New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









When you run apt update and the kernel getting updated to a newer version. The command uname -r may takes the current older kernel version.



This mismatches between the updated kernel version and the old version the reason why it fails.



So to test: Do not update



  1. apt install linux-headers-$(uname -r)

  2. do not install the new headers

  3. run update and upgrade

  4. rerun apt install linux-headers-$(uname -r)

  5. error

  6. reboot

  7. rerun apt install linux-headers-$(uname -r)

  8. works..






share|improve this answer










New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited 2 days ago









Goro

4,02752154




4,02752154






New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 2 days ago









herpyderp

1




1




New contributor




herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






herpyderp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Welcome, The question is how to install the guest addition, not the linux-headers.
    – GAD3R
    2 days ago







  • 1




    It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
    – Jeff Schaller
    2 days ago






  • 1




    @JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
    – GAD3R
    yesterday
















  • Welcome, The question is how to install the guest addition, not the linux-headers.
    – GAD3R
    2 days ago







  • 1




    It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
    – Jeff Schaller
    2 days ago






  • 1




    @JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
    – GAD3R
    yesterday















Welcome, The question is how to install the guest addition, not the linux-headers.
– GAD3R
2 days ago





Welcome, The question is how to install the guest addition, not the linux-headers.
– GAD3R
2 days ago





1




1




It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
– Jeff Schaller
2 days ago




It does seem like the title of the question is aimed at installing the guest additions, but the question (confusingly) lands at asking how to get past the "unable to locate ... linux-headers..." issue.
– Jeff Schaller
2 days ago




1




1




@JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
– GAD3R
yesterday




@JeffSchaller Already mentioned on the accepted answer , upgrading the package , rebooting , installing the kernel headers and the guest additions.
– GAD3R
yesterday





protected by GAD3R 2 days ago



Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



Would you like to answer one of these unanswered questions instead?


Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)