After installing Dart commands like pub, dart2js are not found












12















I've installed Dart according to instructions from the official website (https://www.dartlang.org/tools/debian.html). To be more exactly:



$ sudo apt-get update
$ sudo apt-get install apt-transport-https
# Get the Google Linux package signing key.
$ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
# Set up the location of the stable repository.
$ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
$ sudo apt-get update
$ sudo apt-get install dart


Installation was successful, but some time later I found that there is no other related commands like pub, dart2js.



pub: command not found
dart2js: command not found


What's wrong?



OS: Ubuntu 14.10










share|improve this question





























    12















    I've installed Dart according to instructions from the official website (https://www.dartlang.org/tools/debian.html). To be more exactly:



    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https
    # Get the Google Linux package signing key.
    $ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
    # Set up the location of the stable repository.
    $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
    $ sudo apt-get update
    $ sudo apt-get install dart


    Installation was successful, but some time later I found that there is no other related commands like pub, dart2js.



    pub: command not found
    dart2js: command not found


    What's wrong?



    OS: Ubuntu 14.10










    share|improve this question



























      12












      12








      12


      2






      I've installed Dart according to instructions from the official website (https://www.dartlang.org/tools/debian.html). To be more exactly:



      $ sudo apt-get update
      $ sudo apt-get install apt-transport-https
      # Get the Google Linux package signing key.
      $ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
      # Set up the location of the stable repository.
      $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
      $ sudo apt-get update
      $ sudo apt-get install dart


      Installation was successful, but some time later I found that there is no other related commands like pub, dart2js.



      pub: command not found
      dart2js: command not found


      What's wrong?



      OS: Ubuntu 14.10










      share|improve this question
















      I've installed Dart according to instructions from the official website (https://www.dartlang.org/tools/debian.html). To be more exactly:



      $ sudo apt-get update
      $ sudo apt-get install apt-transport-https
      # Get the Google Linux package signing key.
      $ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
      # Set up the location of the stable repository.
      $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
      $ sudo apt-get update
      $ sudo apt-get install dart


      Installation was successful, but some time later I found that there is no other related commands like pub, dart2js.



      pub: command not found
      dart2js: command not found


      What's wrong?



      OS: Ubuntu 14.10







      apt package-management googledart






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 20 '15 at 18:55







      Timur Fayzrakhmanov

















      asked Mar 20 '15 at 18:42









      Timur FayzrakhmanovTimur Fayzrakhmanov

      17.2k81934




      17.2k81934






















          3 Answers
          3






          active

          oldest

          votes


















          17














          I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.



          You should be able to run them by providing the full path:



          /usr/lib/dart/bin/dart2js


          Or you may want to add /usr/lib/dart/bin to $PATH.






          share|improve this answer


























          • Thanks, I've already installed Dart manually using ~/.profile :)

            – Timur Fayzrakhmanov
            Mar 22 '15 at 13:47






          • 1





            I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

            – will
            Mar 10 '16 at 12:54



















          0














          I know it's a bit late , but I am putting this for future reference
          As @Eric mentioned , dart directory needs to be added to your PATH .



          These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:



          $ sudo nano .profile


          Then add this line to your .profile file :



          export PATH=$PATH:/usr/lib/dart/bin


          Then you need to reload your .profile file :



          . ~/.profile





          share|improve this answer































            0














            Another way to fix it using symlinks



            sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
            sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js





            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%2f599259%2fafter-installing-dart-commands-like-pub-dart2js-are-not-found%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              17














              I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.



              You should be able to run them by providing the full path:



              /usr/lib/dart/bin/dart2js


              Or you may want to add /usr/lib/dart/bin to $PATH.






              share|improve this answer


























              • Thanks, I've already installed Dart manually using ~/.profile :)

                – Timur Fayzrakhmanov
                Mar 22 '15 at 13:47






              • 1





                I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

                – will
                Mar 10 '16 at 12:54
















              17














              I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.



              You should be able to run them by providing the full path:



              /usr/lib/dart/bin/dart2js


              Or you may want to add /usr/lib/dart/bin to $PATH.






              share|improve this answer


























              • Thanks, I've already installed Dart manually using ~/.profile :)

                – Timur Fayzrakhmanov
                Mar 22 '15 at 13:47






              • 1





                I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

                – will
                Mar 10 '16 at 12:54














              17












              17








              17







              I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.



              You should be able to run them by providing the full path:



              /usr/lib/dart/bin/dart2js


              Or you may want to add /usr/lib/dart/bin to $PATH.






              share|improve this answer















              I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.



              You should be able to run them by providing the full path:



              /usr/lib/dart/bin/dart2js


              Or you may want to add /usr/lib/dart/bin to $PATH.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 13 '17 at 12:24









              Community

              1




              1










              answered Mar 22 '15 at 13:29









              Eric CarvalhoEric Carvalho

              41.5k17114145




              41.5k17114145













              • Thanks, I've already installed Dart manually using ~/.profile :)

                – Timur Fayzrakhmanov
                Mar 22 '15 at 13:47






              • 1





                I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

                – will
                Mar 10 '16 at 12:54



















              • Thanks, I've already installed Dart manually using ~/.profile :)

                – Timur Fayzrakhmanov
                Mar 22 '15 at 13:47






              • 1





                I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

                – will
                Mar 10 '16 at 12:54

















              Thanks, I've already installed Dart manually using ~/.profile :)

              – Timur Fayzrakhmanov
              Mar 22 '15 at 13:47





              Thanks, I've already installed Dart manually using ~/.profile :)

              – Timur Fayzrakhmanov
              Mar 22 '15 at 13:47




              1




              1





              I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

              – will
              Mar 10 '16 at 12:54





              I decided, "pub" was a little vague or too general. So i made a link instead, ln -s /usr/lib/dart/bin/pub ~/bin/util/dart-pub -- I could have called it "pub", the main point from my side is that ~/bin/util is already in my PATH.

              – will
              Mar 10 '16 at 12:54













              0














              I know it's a bit late , but I am putting this for future reference
              As @Eric mentioned , dart directory needs to be added to your PATH .



              These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:



              $ sudo nano .profile


              Then add this line to your .profile file :



              export PATH=$PATH:/usr/lib/dart/bin


              Then you need to reload your .profile file :



              . ~/.profile





              share|improve this answer




























                0














                I know it's a bit late , but I am putting this for future reference
                As @Eric mentioned , dart directory needs to be added to your PATH .



                These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:



                $ sudo nano .profile


                Then add this line to your .profile file :



                export PATH=$PATH:/usr/lib/dart/bin


                Then you need to reload your .profile file :



                . ~/.profile





                share|improve this answer


























                  0












                  0








                  0







                  I know it's a bit late , but I am putting this for future reference
                  As @Eric mentioned , dart directory needs to be added to your PATH .



                  These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:



                  $ sudo nano .profile


                  Then add this line to your .profile file :



                  export PATH=$PATH:/usr/lib/dart/bin


                  Then you need to reload your .profile file :



                  . ~/.profile





                  share|improve this answer













                  I know it's a bit late , but I am putting this for future reference
                  As @Eric mentioned , dart directory needs to be added to your PATH .



                  These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:



                  $ sudo nano .profile


                  Then add this line to your .profile file :



                  export PATH=$PATH:/usr/lib/dart/bin


                  Then you need to reload your .profile file :



                  . ~/.profile






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 12 '18 at 16:11









                  Ahmed AbouziedAhmed Abouzied

                  1




                  1























                      0














                      Another way to fix it using symlinks



                      sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
                      sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js





                      share|improve this answer




























                        0














                        Another way to fix it using symlinks



                        sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
                        sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js





                        share|improve this answer


























                          0












                          0








                          0







                          Another way to fix it using symlinks



                          sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
                          sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js





                          share|improve this answer













                          Another way to fix it using symlinks



                          sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
                          sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 9 hours ago









                          Jossef HarushJossef Harush

                          2,6271914




                          2,6271914






























                              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.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f599259%2fafter-installing-dart-commands-like-pub-dart2js-are-not-found%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

                              GameSpot

                              日野市

                              Tu-95轟炸機