netplan error line 1 column 8











up vote
0
down vote

favorite












Hi I have a problem with ubuntu 18.04. I need edit this file



/etc/netplan/50-cloud-init.yaml 


But when I use netplan apply see error linie 0 kolumn 8 this is ":".



#
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
adresses: [192.168.16.186/24]
dhcp4: no
dhcp6: no
nameservers:
addresses: [192.168.16.190, 192.168.16.186]


$ sudo netplan apply
Error in network definition //etc/netplan/50-cloud-init.yaml line 1 column 8: expected mapping


Please help :)










share|improve this question




























    up vote
    0
    down vote

    favorite












    Hi I have a problem with ubuntu 18.04. I need edit this file



    /etc/netplan/50-cloud-init.yaml 


    But when I use netplan apply see error linie 0 kolumn 8 this is ":".



    #
    network:
    version: 2
    renderer: networkd
    ethernets:
    enp0s3:
    adresses: [192.168.16.186/24]
    dhcp4: no
    dhcp6: no
    nameservers:
    addresses: [192.168.16.190, 192.168.16.186]


    $ sudo netplan apply
    Error in network definition //etc/netplan/50-cloud-init.yaml line 1 column 8: expected mapping


    Please help :)










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Hi I have a problem with ubuntu 18.04. I need edit this file



      /etc/netplan/50-cloud-init.yaml 


      But when I use netplan apply see error linie 0 kolumn 8 this is ":".



      #
      network:
      version: 2
      renderer: networkd
      ethernets:
      enp0s3:
      adresses: [192.168.16.186/24]
      dhcp4: no
      dhcp6: no
      nameservers:
      addresses: [192.168.16.190, 192.168.16.186]


      $ sudo netplan apply
      Error in network definition //etc/netplan/50-cloud-init.yaml line 1 column 8: expected mapping


      Please help :)










      share|improve this question















      Hi I have a problem with ubuntu 18.04. I need edit this file



      /etc/netplan/50-cloud-init.yaml 


      But when I use netplan apply see error linie 0 kolumn 8 this is ":".



      #
      network:
      version: 2
      renderer: networkd
      ethernets:
      enp0s3:
      adresses: [192.168.16.186/24]
      dhcp4: no
      dhcp6: no
      nameservers:
      addresses: [192.168.16.190, 192.168.16.186]


      $ sudo netplan apply
      Error in network definition //etc/netplan/50-cloud-init.yaml line 1 column 8: expected mapping


      Please help :)







      server 18.04






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 at 15:43









      PerlDuck

      4,88911230




      4,88911230










      asked Nov 25 at 9:25









      Przemysław Krawiec

      11




      11






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          my file looks like



          network:
          ethernets:
          enp2so:
          addresses: [192.168.1.1/24]
          dhcp4: no
          version: 2


          Replace enp2so with your network adapter name(enp0so3) you could try that






          share|improve this answer





















          • this same linie 0 kolumn 8 :/
            – Przemysław Krawiec
            Nov 25 at 9:59






          • 2




            have you used indentation?
            – N. Phip
            Nov 25 at 9:59










          • No I don't use indentation. This is truth is a new contribution but for me beter will be old.
            – Przemysław Krawiec
            Nov 25 at 12:39










          • I give Tab but now I have error 0 line 0 colum :/
            – Przemysław Krawiec
            Nov 25 at 12:44










          • [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
            – Przemysław Krawiec
            Nov 25 at 14:12




















          up vote
          2
          down vote













          You MUST retain indentation.



          Here is probably what your .yaml file should look like...



          network:
          version: 2
          renderer: networkd
          ethernets:
          enp0s3:
          dhcp4: no
          dhcp6: no
          addresses: [192.168.16.186/24]
          gateway4: 192.168.16.1
          nameservers:
          addresses: [192.168.16.190, 192.168.16.186]


          Then, in terminal...



          sudo netplan --debug generate # generate config files



          sudo netplan apply # apply current configuration



          reboot # reboot the system



          Note: see https://netplan.io/examples for more examples






          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',
            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%2f1095861%2fnetplan-error-line-1-column-8%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








            up vote
            2
            down vote













            my file looks like



            network:
            ethernets:
            enp2so:
            addresses: [192.168.1.1/24]
            dhcp4: no
            version: 2


            Replace enp2so with your network adapter name(enp0so3) you could try that






            share|improve this answer





















            • this same linie 0 kolumn 8 :/
              – Przemysław Krawiec
              Nov 25 at 9:59






            • 2




              have you used indentation?
              – N. Phip
              Nov 25 at 9:59










            • No I don't use indentation. This is truth is a new contribution but for me beter will be old.
              – Przemysław Krawiec
              Nov 25 at 12:39










            • I give Tab but now I have error 0 line 0 colum :/
              – Przemysław Krawiec
              Nov 25 at 12:44










            • [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
              – Przemysław Krawiec
              Nov 25 at 14:12

















            up vote
            2
            down vote













            my file looks like



            network:
            ethernets:
            enp2so:
            addresses: [192.168.1.1/24]
            dhcp4: no
            version: 2


            Replace enp2so with your network adapter name(enp0so3) you could try that






            share|improve this answer





















            • this same linie 0 kolumn 8 :/
              – Przemysław Krawiec
              Nov 25 at 9:59






            • 2




              have you used indentation?
              – N. Phip
              Nov 25 at 9:59










            • No I don't use indentation. This is truth is a new contribution but for me beter will be old.
              – Przemysław Krawiec
              Nov 25 at 12:39










            • I give Tab but now I have error 0 line 0 colum :/
              – Przemysław Krawiec
              Nov 25 at 12:44










            • [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
              – Przemysław Krawiec
              Nov 25 at 14:12















            up vote
            2
            down vote










            up vote
            2
            down vote









            my file looks like



            network:
            ethernets:
            enp2so:
            addresses: [192.168.1.1/24]
            dhcp4: no
            version: 2


            Replace enp2so with your network adapter name(enp0so3) you could try that






            share|improve this answer












            my file looks like



            network:
            ethernets:
            enp2so:
            addresses: [192.168.1.1/24]
            dhcp4: no
            version: 2


            Replace enp2so with your network adapter name(enp0so3) you could try that







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 25 at 9:48









            N. Phip

            213




            213












            • this same linie 0 kolumn 8 :/
              – Przemysław Krawiec
              Nov 25 at 9:59






            • 2




              have you used indentation?
              – N. Phip
              Nov 25 at 9:59










            • No I don't use indentation. This is truth is a new contribution but for me beter will be old.
              – Przemysław Krawiec
              Nov 25 at 12:39










            • I give Tab but now I have error 0 line 0 colum :/
              – Przemysław Krawiec
              Nov 25 at 12:44










            • [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
              – Przemysław Krawiec
              Nov 25 at 14:12




















            • this same linie 0 kolumn 8 :/
              – Przemysław Krawiec
              Nov 25 at 9:59






            • 2




              have you used indentation?
              – N. Phip
              Nov 25 at 9:59










            • No I don't use indentation. This is truth is a new contribution but for me beter will be old.
              – Przemysław Krawiec
              Nov 25 at 12:39










            • I give Tab but now I have error 0 line 0 colum :/
              – Przemysław Krawiec
              Nov 25 at 12:44










            • [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
              – Przemysław Krawiec
              Nov 25 at 14:12


















            this same linie 0 kolumn 8 :/
            – Przemysław Krawiec
            Nov 25 at 9:59




            this same linie 0 kolumn 8 :/
            – Przemysław Krawiec
            Nov 25 at 9:59




            2




            2




            have you used indentation?
            – N. Phip
            Nov 25 at 9:59




            have you used indentation?
            – N. Phip
            Nov 25 at 9:59












            No I don't use indentation. This is truth is a new contribution but for me beter will be old.
            – Przemysław Krawiec
            Nov 25 at 12:39




            No I don't use indentation. This is truth is a new contribution but for me beter will be old.
            – Przemysław Krawiec
            Nov 25 at 12:39












            I give Tab but now I have error 0 line 0 colum :/
            – Przemysław Krawiec
            Nov 25 at 12:44




            I give Tab but now I have error 0 line 0 colum :/
            – Przemysław Krawiec
            Nov 25 at 12:44












            [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
            – Przemysław Krawiec
            Nov 25 at 14:12






            [link] (<a href="fotosik.pl/zdjecie/eb52410568bf060c" </a>)[/link]
            – Przemysław Krawiec
            Nov 25 at 14:12














            up vote
            2
            down vote













            You MUST retain indentation.



            Here is probably what your .yaml file should look like...



            network:
            version: 2
            renderer: networkd
            ethernets:
            enp0s3:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.16.186/24]
            gateway4: 192.168.16.1
            nameservers:
            addresses: [192.168.16.190, 192.168.16.186]


            Then, in terminal...



            sudo netplan --debug generate # generate config files



            sudo netplan apply # apply current configuration



            reboot # reboot the system



            Note: see https://netplan.io/examples for more examples






            share|improve this answer

























              up vote
              2
              down vote













              You MUST retain indentation.



              Here is probably what your .yaml file should look like...



              network:
              version: 2
              renderer: networkd
              ethernets:
              enp0s3:
              dhcp4: no
              dhcp6: no
              addresses: [192.168.16.186/24]
              gateway4: 192.168.16.1
              nameservers:
              addresses: [192.168.16.190, 192.168.16.186]


              Then, in terminal...



              sudo netplan --debug generate # generate config files



              sudo netplan apply # apply current configuration



              reboot # reboot the system



              Note: see https://netplan.io/examples for more examples






              share|improve this answer























                up vote
                2
                down vote










                up vote
                2
                down vote









                You MUST retain indentation.



                Here is probably what your .yaml file should look like...



                network:
                version: 2
                renderer: networkd
                ethernets:
                enp0s3:
                dhcp4: no
                dhcp6: no
                addresses: [192.168.16.186/24]
                gateway4: 192.168.16.1
                nameservers:
                addresses: [192.168.16.190, 192.168.16.186]


                Then, in terminal...



                sudo netplan --debug generate # generate config files



                sudo netplan apply # apply current configuration



                reboot # reboot the system



                Note: see https://netplan.io/examples for more examples






                share|improve this answer












                You MUST retain indentation.



                Here is probably what your .yaml file should look like...



                network:
                version: 2
                renderer: networkd
                ethernets:
                enp0s3:
                dhcp4: no
                dhcp6: no
                addresses: [192.168.16.186/24]
                gateway4: 192.168.16.1
                nameservers:
                addresses: [192.168.16.190, 192.168.16.186]


                Then, in terminal...



                sudo netplan --debug generate # generate config files



                sudo netplan apply # apply current configuration



                reboot # reboot the system



                Note: see https://netplan.io/examples for more examples







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 25 at 14:55









                heynnema

                17.3k22053




                17.3k22053






























                    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%2f1095861%2fnetplan-error-line-1-column-8%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

                    Quarter-circle Tiles

                    build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                    Mont Emei