Deleted /usr/include by mistake
Like a real idiot, I deleted my
/usr/include
on 13.04, is there anyway I can retrieve this?
delete
add a comment |
Like a real idiot, I deleted my
/usr/include
on 13.04, is there anyway I can retrieve this?
delete
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08
add a comment |
Like a real idiot, I deleted my
/usr/include
on 13.04, is there anyway I can retrieve this?
delete
Like a real idiot, I deleted my
/usr/include
on 13.04, is there anyway I can retrieve this?
delete
delete
asked Jul 14 '13 at 21:34
RadagaspRadagasp
1751119
1751119
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08
add a comment |
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08
add a comment |
2 Answers
2
active
oldest
votes
/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.
Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.
sudo apt-get update
sudo apt-get upgrade
If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*
, and use sudo apt-get reinstall [package]
to fix things.
Edit : Best solution found in the comments :
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
In order to reinstall all packages that where corrupted.
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something likesudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.
– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY
– John WH Smith
Jul 14 '13 at 22:05
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
|
show 4 more comments
Hi (and thanks for solution), some additional commands used by me:
dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )
New contributor
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%2f320072%2fdeleted-usr-include-by-mistake%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
/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.
Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.
sudo apt-get update
sudo apt-get upgrade
If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*
, and use sudo apt-get reinstall [package]
to fix things.
Edit : Best solution found in the comments :
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
In order to reinstall all packages that where corrupted.
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something likesudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.
– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY
– John WH Smith
Jul 14 '13 at 22:05
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
|
show 4 more comments
/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.
Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.
sudo apt-get update
sudo apt-get upgrade
If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*
, and use sudo apt-get reinstall [package]
to fix things.
Edit : Best solution found in the comments :
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
In order to reinstall all packages that where corrupted.
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something likesudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.
– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY
– John WH Smith
Jul 14 '13 at 22:05
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
|
show 4 more comments
/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.
Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.
sudo apt-get update
sudo apt-get upgrade
If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*
, and use sudo apt-get reinstall [package]
to fix things.
Edit : Best solution found in the comments :
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
In order to reinstall all packages that where corrupted.
/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.
Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.
sudo apt-get update
sudo apt-get upgrade
If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*
, and use sudo apt-get reinstall [package]
to fix things.
Edit : Best solution found in the comments :
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
In order to reinstall all packages that where corrupted.
edited Jul 15 '13 at 13:17
answered Jul 14 '13 at 21:38
John WH SmithJohn WH Smith
1,723921
1,723921
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something likesudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.
– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY
– John WH Smith
Jul 14 '13 at 22:05
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
|
show 4 more comments
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something likesudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.
– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY
– John WH Smith
Jul 14 '13 at 22:05
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?
– Radagasp
Jul 14 '13 at 21:43
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like
sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.– John WH Smith
Jul 14 '13 at 21:55
The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like
sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
but keep in mind that it is RISKY.– John WH Smith
Jul 14 '13 at 21:55
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
thanks it says, apt-get reinstall is an invalid operation
– Radagasp
Jul 14 '13 at 22:04
My bad.
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY– John WH Smith
Jul 14 '13 at 22:05
My bad.
sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')
- Still as RISKY– John WH Smith
Jul 14 '13 at 22:05
1
1
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
Perhaps I should do a back up first?
– Radagasp
Jul 14 '13 at 22:11
|
show 4 more comments
Hi (and thanks for solution), some additional commands used by me:
dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )
New contributor
add a comment |
Hi (and thanks for solution), some additional commands used by me:
dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )
New contributor
add a comment |
Hi (and thanks for solution), some additional commands used by me:
dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )
New contributor
Hi (and thanks for solution), some additional commands used by me:
dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )
New contributor
New contributor
answered 6 hours ago
usertcusertc
1
1
New contributor
New contributor
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%2f320072%2fdeleted-usr-include-by-mistake%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
so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems
– Sergio
Jul 27 '16 at 5:08