Error install nvidia-387: Error! Bad return status for module build on kernel:
I'm trying to install nvidia-387 on my fresh Ubuntu 16.04.
Once I launch sudo apt-get install nvidia-387
I always end up in the following outputs:
Building initial module for 4.13.0-26-generic
Error! Bad return status for module build on kernel: 4.13.0-26-generic (x86_64)
During my searches I found lot of issues pointing to a wrong gcc version but after several attempts I wasn't able to find a way to go: following this discussion I tried with gcc 4.8/4-9/5.4/6 without any luck.
Any help?
Thank you very much.
drivers nvidia gcc
add a comment |
I'm trying to install nvidia-387 on my fresh Ubuntu 16.04.
Once I launch sudo apt-get install nvidia-387
I always end up in the following outputs:
Building initial module for 4.13.0-26-generic
Error! Bad return status for module build on kernel: 4.13.0-26-generic (x86_64)
During my searches I found lot of issues pointing to a wrong gcc version but after several attempts I wasn't able to find a way to go: following this discussion I tried with gcc 4.8/4-9/5.4/6 without any luck.
Any help?
Thank you very much.
drivers nvidia gcc
add a comment |
I'm trying to install nvidia-387 on my fresh Ubuntu 16.04.
Once I launch sudo apt-get install nvidia-387
I always end up in the following outputs:
Building initial module for 4.13.0-26-generic
Error! Bad return status for module build on kernel: 4.13.0-26-generic (x86_64)
During my searches I found lot of issues pointing to a wrong gcc version but after several attempts I wasn't able to find a way to go: following this discussion I tried with gcc 4.8/4-9/5.4/6 without any luck.
Any help?
Thank you very much.
drivers nvidia gcc
I'm trying to install nvidia-387 on my fresh Ubuntu 16.04.
Once I launch sudo apt-get install nvidia-387
I always end up in the following outputs:
Building initial module for 4.13.0-26-generic
Error! Bad return status for module build on kernel: 4.13.0-26-generic (x86_64)
During my searches I found lot of issues pointing to a wrong gcc version but after several attempts I wasn't able to find a way to go: following this discussion I tried with gcc 4.8/4-9/5.4/6 without any luck.
Any help?
Thank you very much.
drivers nvidia gcc
drivers nvidia gcc
asked Jan 15 '18 at 1:16
luke035luke035
5015
5015
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Looks like the issue is cause by some shuffling of linux headers in some recent linux kernel updates.
Relevant discussion:
https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/
I had the exact same issue and I fixed it by applying the patch suggested by user PGNd in the discussion above.
Step by step instructions for manual edit of the nvidia src files on Ubuntu 16.04:
sudo apt-get install nvidia-387
(this will fail)
sudo nano /usr/src/nvidia-387-387.26/nvidia-uvm/uvm8_va_block.c
(you should replacenvidia-387-387.26
with the version you are trying to install.)- Add the line
#include <linux/sched/task_stack.h>
before the other include statements at the beginning of the file - Run
sudo dpkg-reconfigure nvidia-387
to rebuild the nvidia driver - Reboot
This should work as a temporary workaround until nvidia releases a fix.
I was able to install cuda-9.1 after doing this.
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
add a comment |
@adikus's answer did not work for me. Even after adding the header the build error continue to happen. What fixed the issue for me was upgrading the version of the drivers to 410:
sudo apt-get update
sudo apt-get install nvidia-410
The compilation for this version succeeded and I'm now able to play games once again.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f995969%2ferror-install-nvidia-387-error-bad-return-status-for-module-build-on-kernel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looks like the issue is cause by some shuffling of linux headers in some recent linux kernel updates.
Relevant discussion:
https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/
I had the exact same issue and I fixed it by applying the patch suggested by user PGNd in the discussion above.
Step by step instructions for manual edit of the nvidia src files on Ubuntu 16.04:
sudo apt-get install nvidia-387
(this will fail)
sudo nano /usr/src/nvidia-387-387.26/nvidia-uvm/uvm8_va_block.c
(you should replacenvidia-387-387.26
with the version you are trying to install.)- Add the line
#include <linux/sched/task_stack.h>
before the other include statements at the beginning of the file - Run
sudo dpkg-reconfigure nvidia-387
to rebuild the nvidia driver - Reboot
This should work as a temporary workaround until nvidia releases a fix.
I was able to install cuda-9.1 after doing this.
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
add a comment |
Looks like the issue is cause by some shuffling of linux headers in some recent linux kernel updates.
Relevant discussion:
https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/
I had the exact same issue and I fixed it by applying the patch suggested by user PGNd in the discussion above.
Step by step instructions for manual edit of the nvidia src files on Ubuntu 16.04:
sudo apt-get install nvidia-387
(this will fail)
sudo nano /usr/src/nvidia-387-387.26/nvidia-uvm/uvm8_va_block.c
(you should replacenvidia-387-387.26
with the version you are trying to install.)- Add the line
#include <linux/sched/task_stack.h>
before the other include statements at the beginning of the file - Run
sudo dpkg-reconfigure nvidia-387
to rebuild the nvidia driver - Reboot
This should work as a temporary workaround until nvidia releases a fix.
I was able to install cuda-9.1 after doing this.
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
add a comment |
Looks like the issue is cause by some shuffling of linux headers in some recent linux kernel updates.
Relevant discussion:
https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/
I had the exact same issue and I fixed it by applying the patch suggested by user PGNd in the discussion above.
Step by step instructions for manual edit of the nvidia src files on Ubuntu 16.04:
sudo apt-get install nvidia-387
(this will fail)
sudo nano /usr/src/nvidia-387-387.26/nvidia-uvm/uvm8_va_block.c
(you should replacenvidia-387-387.26
with the version you are trying to install.)- Add the line
#include <linux/sched/task_stack.h>
before the other include statements at the beginning of the file - Run
sudo dpkg-reconfigure nvidia-387
to rebuild the nvidia driver - Reboot
This should work as a temporary workaround until nvidia releases a fix.
I was able to install cuda-9.1 after doing this.
Looks like the issue is cause by some shuffling of linux headers in some recent linux kernel updates.
Relevant discussion:
https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/
I had the exact same issue and I fixed it by applying the patch suggested by user PGNd in the discussion above.
Step by step instructions for manual edit of the nvidia src files on Ubuntu 16.04:
sudo apt-get install nvidia-387
(this will fail)
sudo nano /usr/src/nvidia-387-387.26/nvidia-uvm/uvm8_va_block.c
(you should replacenvidia-387-387.26
with the version you are trying to install.)- Add the line
#include <linux/sched/task_stack.h>
before the other include statements at the beginning of the file - Run
sudo dpkg-reconfigure nvidia-387
to rebuild the nvidia driver - Reboot
This should work as a temporary workaround until nvidia releases a fix.
I was able to install cuda-9.1 after doing this.
answered Jan 15 '18 at 15:29
adikusadikus
1061
1061
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
add a comment |
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
1
1
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
It worked perfectly, you saved me! Thanks a lot!
– luke035
Jan 15 '18 at 23:07
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
This worked! For posterity this can also cause a login loop. You may have found yourself in this situation by trying to install nvidia drivers (in my case to get CUDA 9.1 running) prior to a fresh 16.04 install being fully updated. Initially the drivers may have appeared to work (on an older kernel) but then the update to 14.3.x left them in this broken state.
– Ian Danforth
Jan 21 '18 at 18:25
add a comment |
@adikus's answer did not work for me. Even after adding the header the build error continue to happen. What fixed the issue for me was upgrading the version of the drivers to 410:
sudo apt-get update
sudo apt-get install nvidia-410
The compilation for this version succeeded and I'm now able to play games once again.
add a comment |
@adikus's answer did not work for me. Even after adding the header the build error continue to happen. What fixed the issue for me was upgrading the version of the drivers to 410:
sudo apt-get update
sudo apt-get install nvidia-410
The compilation for this version succeeded and I'm now able to play games once again.
add a comment |
@adikus's answer did not work for me. Even after adding the header the build error continue to happen. What fixed the issue for me was upgrading the version of the drivers to 410:
sudo apt-get update
sudo apt-get install nvidia-410
The compilation for this version succeeded and I'm now able to play games once again.
@adikus's answer did not work for me. Even after adding the header the build error continue to happen. What fixed the issue for me was upgrading the version of the drivers to 410:
sudo apt-get update
sudo apt-get install nvidia-410
The compilation for this version succeeded and I'm now able to play games once again.
answered Mar 17 at 23:17
SergioSergio
101
101
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f995969%2ferror-install-nvidia-387-error-bad-return-status-for-module-build-on-kernel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown