Made an oupsie while testing some protection and executed rm /usr/bin/clang*
I deleted clang. I tried to use apt to uninstall clang, and then re-install it but I get this error:
Setting up clang (1:3.8-33ubuntu3.1) ...
update-alternatives: error: alternative path /usr/bin/clang++ doesn't
exist
dpkg: error processing package clang (--configure):
subprocess installed post-installation script returned error exit
status 2
Errors were encountered while processing:
clang
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried also using apt to remove llvm and reinstall it knowing it should also install clang.
I'm using Ubuntu 16.04, since further versions are un-workingly buggy for me.
Here's some more info:
main@ws001:~$ whereis clang
clang: /usr/bin/clang #this is obviously broken
main@ws001:~$ which clang
apt-cache depends clang
clang
Depends: clang-3.8
Breaks: <clang-3.2>
Breaks: <clang-3.3>
Breaks: <clang-3.4>
Breaks: clang-3.5
Replaces: clang
Replaces: <clang-3.2>
Replaces: <clang-3.3>
Replaces: <clang-3.4>
Replaces: clang-3.5
ubuntu apt clang llvm
add a comment |
I deleted clang. I tried to use apt to uninstall clang, and then re-install it but I get this error:
Setting up clang (1:3.8-33ubuntu3.1) ...
update-alternatives: error: alternative path /usr/bin/clang++ doesn't
exist
dpkg: error processing package clang (--configure):
subprocess installed post-installation script returned error exit
status 2
Errors were encountered while processing:
clang
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried also using apt to remove llvm and reinstall it knowing it should also install clang.
I'm using Ubuntu 16.04, since further versions are un-workingly buggy for me.
Here's some more info:
main@ws001:~$ whereis clang
clang: /usr/bin/clang #this is obviously broken
main@ws001:~$ which clang
apt-cache depends clang
clang
Depends: clang-3.8
Breaks: <clang-3.2>
Breaks: <clang-3.3>
Breaks: <clang-3.4>
Breaks: clang-3.5
Replaces: clang
Replaces: <clang-3.2>
Replaces: <clang-3.3>
Replaces: <clang-3.4>
Replaces: clang-3.5
ubuntu apt clang llvm
You probably need to re-install the underlying dependency package (likelyclang-3.8
- but confirm withapt-cache depends clang
)
– steeldriver
May 17 '17 at 14:05
add a comment |
I deleted clang. I tried to use apt to uninstall clang, and then re-install it but I get this error:
Setting up clang (1:3.8-33ubuntu3.1) ...
update-alternatives: error: alternative path /usr/bin/clang++ doesn't
exist
dpkg: error processing package clang (--configure):
subprocess installed post-installation script returned error exit
status 2
Errors were encountered while processing:
clang
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried also using apt to remove llvm and reinstall it knowing it should also install clang.
I'm using Ubuntu 16.04, since further versions are un-workingly buggy for me.
Here's some more info:
main@ws001:~$ whereis clang
clang: /usr/bin/clang #this is obviously broken
main@ws001:~$ which clang
apt-cache depends clang
clang
Depends: clang-3.8
Breaks: <clang-3.2>
Breaks: <clang-3.3>
Breaks: <clang-3.4>
Breaks: clang-3.5
Replaces: clang
Replaces: <clang-3.2>
Replaces: <clang-3.3>
Replaces: <clang-3.4>
Replaces: clang-3.5
ubuntu apt clang llvm
I deleted clang. I tried to use apt to uninstall clang, and then re-install it but I get this error:
Setting up clang (1:3.8-33ubuntu3.1) ...
update-alternatives: error: alternative path /usr/bin/clang++ doesn't
exist
dpkg: error processing package clang (--configure):
subprocess installed post-installation script returned error exit
status 2
Errors were encountered while processing:
clang
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried also using apt to remove llvm and reinstall it knowing it should also install clang.
I'm using Ubuntu 16.04, since further versions are un-workingly buggy for me.
Here's some more info:
main@ws001:~$ whereis clang
clang: /usr/bin/clang #this is obviously broken
main@ws001:~$ which clang
apt-cache depends clang
clang
Depends: clang-3.8
Breaks: <clang-3.2>
Breaks: <clang-3.3>
Breaks: <clang-3.4>
Breaks: clang-3.5
Replaces: clang
Replaces: <clang-3.2>
Replaces: <clang-3.3>
Replaces: <clang-3.4>
Replaces: clang-3.5
ubuntu apt clang llvm
ubuntu apt clang llvm
edited 1 hour ago
Rui F Ribeiro
39.6k1479132
39.6k1479132
asked May 17 '17 at 13:45
curious studentcurious student
142
142
You probably need to re-install the underlying dependency package (likelyclang-3.8
- but confirm withapt-cache depends clang
)
– steeldriver
May 17 '17 at 14:05
add a comment |
You probably need to re-install the underlying dependency package (likelyclang-3.8
- but confirm withapt-cache depends clang
)
– steeldriver
May 17 '17 at 14:05
You probably need to re-install the underlying dependency package (likely
clang-3.8
- but confirm with apt-cache depends clang
)– steeldriver
May 17 '17 at 14:05
You probably need to re-install the underlying dependency package (likely
clang-3.8
- but confirm with apt-cache depends clang
)– steeldriver
May 17 '17 at 14:05
add a comment |
2 Answers
2
active
oldest
votes
You could reinstall the packages with the --force-overwrite
flag:
dpkg -i --force-overwrite /var/cache/apt/archives/clang*
Look at the cache for older versions before you use clang*
.
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?
– ctx
May 17 '17 at 15:11
add a comment |
Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f365629%2fmade-an-oupsie-while-testing-some-protection-and-executed-rm-usr-bin-clang%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
You could reinstall the packages with the --force-overwrite
flag:
dpkg -i --force-overwrite /var/cache/apt/archives/clang*
Look at the cache for older versions before you use clang*
.
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?
– ctx
May 17 '17 at 15:11
add a comment |
You could reinstall the packages with the --force-overwrite
flag:
dpkg -i --force-overwrite /var/cache/apt/archives/clang*
Look at the cache for older versions before you use clang*
.
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?
– ctx
May 17 '17 at 15:11
add a comment |
You could reinstall the packages with the --force-overwrite
flag:
dpkg -i --force-overwrite /var/cache/apt/archives/clang*
Look at the cache for older versions before you use clang*
.
You could reinstall the packages with the --force-overwrite
flag:
dpkg -i --force-overwrite /var/cache/apt/archives/clang*
Look at the cache for older versions before you use clang*
.
answered May 17 '17 at 14:17
ctxctx
1,597314
1,597314
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?
– ctx
May 17 '17 at 15:11
add a comment |
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?
– ctx
May 17 '17 at 15:11
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
dpkg: error processing package clang (--install): subprocess installed post-installation script returned error exit status 2
– curious student
May 17 '17 at 14:22
You could search for the failing command in
/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?– ctx
May 17 '17 at 15:11
You could search for the failing command in
/var/lib/dpkg/info/clang.{postinst,prerm}
. I cannot reproduce your error with the provided rm command. Did you do something else?– ctx
May 17 '17 at 15:11
add a comment |
Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.
add a comment |
Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.
add a comment |
Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.
Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.
answered May 22 '17 at 17:06
curious studentcurious student
142
142
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f365629%2fmade-an-oupsie-while-testing-some-protection-and-executed-rm-usr-bin-clang%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
You probably need to re-install the underlying dependency package (likely
clang-3.8
- but confirm withapt-cache depends clang
)– steeldriver
May 17 '17 at 14:05