Made an oupsie while testing some protection and executed rm /usr/bin/clang*












3















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









share|improve this question

























  • 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


















3















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









share|improve this question

























  • 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
















3












3








3








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









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 (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



















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












2 Answers
2






active

oldest

votes


















1














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*.






share|improve this answer
























  • 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



















-1














Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.






share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    1














    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*.






    share|improve this answer
























    • 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
















    1














    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*.






    share|improve this answer
























    • 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














    1












    1








    1







    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*.






    share|improve this answer













    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*.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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



















    • 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













    -1














    Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.






    share|improve this answer




























      -1














      Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.






      share|improve this answer


























        -1












        -1








        -1







        Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.






        share|improve this answer













        Solved through OS re-install. If anyone encounters this and manages to solve it, please do let me know how.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 22 '17 at 17:06









        curious studentcurious student

        142




        142






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Loup dans la culture

            How to solve the problem of ntp “Unable to contact time server” from KDE?

            Connection limited (no internet access)