Set clang-3.8 as default












8














I have installed clang 3.0 and clang 3.8:



$ sudo update-alternatives --config clang



update-alternatives: error: no alternatives for clang.




How can I set 3.8 as /usr/bin/clang?










share|improve this question
























  • Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
    – Knud Larsen
    Jun 26 '16 at 20:36












  • Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
    – duli
    Dec 15 at 16:23


















8














I have installed clang 3.0 and clang 3.8:



$ sudo update-alternatives --config clang



update-alternatives: error: no alternatives for clang.




How can I set 3.8 as /usr/bin/clang?










share|improve this question
























  • Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
    – Knud Larsen
    Jun 26 '16 at 20:36












  • Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
    – duli
    Dec 15 at 16:23
















8












8








8


2





I have installed clang 3.0 and clang 3.8:



$ sudo update-alternatives --config clang



update-alternatives: error: no alternatives for clang.




How can I set 3.8 as /usr/bin/clang?










share|improve this question















I have installed clang 3.0 and clang 3.8:



$ sudo update-alternatives --config clang



update-alternatives: error: no alternatives for clang.




How can I set 3.8 as /usr/bin/clang?







12.04 update-alternatives clang






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 26 '16 at 23:53









itnet7

3,27311520




3,27311520










asked Jun 26 '16 at 13:56









Andrew

34929




34929












  • Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
    – Knud Larsen
    Jun 26 '16 at 20:36












  • Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
    – duli
    Dec 15 at 16:23




















  • Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
    – Knud Larsen
    Jun 26 '16 at 20:36












  • Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
    – duli
    Dec 15 at 16:23


















Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
– Knud Larsen
Jun 26 '16 at 20:36






Make one or more clang entries to /etc/alternatives/ : sudo update-alternatives --install "/usr/bin/clang" "clang" "[path-to]/clang" 1000 , like this java example askubuntu.com/questions/56104/…
– Knud Larsen
Jun 26 '16 at 20:36














Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
– duli
Dec 15 at 16:23






Actually, the name is 'cc'. So you need to issue: sudo update-alternatives --config cc
– duli
Dec 15 at 16:23












2 Answers
2






active

oldest

votes


















19














sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100





share|improve this answer























  • I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
    – John P
    Jun 4 at 10:04



















0














Try:



sudo update-alternatives --config cc


And it will present the list of options for you to choose.



make utility uses the command cc to compile, which is actually a link to gcc, clang etc.






share|improve this answer





















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


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f791616%2fset-clang-3-8-as-default%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









    19














    sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

    sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100





    share|improve this answer























    • I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
      – John P
      Jun 4 at 10:04
















    19














    sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

    sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100





    share|improve this answer























    • I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
      – John P
      Jun 4 at 10:04














    19












    19








    19






    sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

    sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100





    share|improve this answer














    sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

    sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jun 27 '16 at 7:14









    Videonauth

    23.6k126898




    23.6k126898










    answered Jun 27 '16 at 5:06









    Andrew

    34929




    34929












    • I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
      – John P
      Jun 4 at 10:04


















    • I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
      – John P
      Jun 4 at 10:04
















    I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
    – John P
    Jun 4 at 10:04




    I was following another example that used '60' to represent '6.0' and --slave instead of independent rules - what are your thoughts? update-alternatives doesn't look like it's doing much more than chaining symlinks, but I haven't used it enough to know what can go wrong.
    – John P
    Jun 4 at 10:04













    0














    Try:



    sudo update-alternatives --config cc


    And it will present the list of options for you to choose.



    make utility uses the command cc to compile, which is actually a link to gcc, clang etc.






    share|improve this answer


























      0














      Try:



      sudo update-alternatives --config cc


      And it will present the list of options for you to choose.



      make utility uses the command cc to compile, which is actually a link to gcc, clang etc.






      share|improve this answer
























        0












        0








        0






        Try:



        sudo update-alternatives --config cc


        And it will present the list of options for you to choose.



        make utility uses the command cc to compile, which is actually a link to gcc, clang etc.






        share|improve this answer












        Try:



        sudo update-alternatives --config cc


        And it will present the list of options for you to choose.



        make utility uses the command cc to compile, which is actually a link to gcc, clang etc.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 15 at 16:25









        duli

        1194




        1194






























            draft saved

            draft discarded




















































            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2faskubuntu.com%2fquestions%2f791616%2fset-clang-3-8-as-default%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

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局