I need to know about 'source' and the use of 'bashrc' in context to installing any package in ROS2019 Community Moderator ElectionHow can I source the bashrc file every time I 'clear'Is it OK to use “.” to run files instead of source - in .bashrc in Ubuntu and OS X?Unable to source .profile and .nvm/nvm.sh from .bashrcWhy does tmux mess up my Ubuntu login, though it works ok once logged in for new windows?Why doesn't my bash terminal recognize any command in the shell?bash: messed up display for long linesWhat's the difference between .bashrc and .inputrcAvoid sourcing scripts multiple timesHow to set environment variables to path so it can be read from GUI and command line from the same program?When should I use .bashrc and when .profile?

Sigmoid with a slope but no asymptotes?

What (the heck) is a Super Worm Equinox Moon?

Grepping string, but include all non-blank lines following each grep match

If the only attacker is removed from combat, is a creature still counted as having attacked this turn?

Would a primitive species be able to learn English from reading books alone?

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

Given this phrasing in the lease, when should I pay my rent?

Typing CO_2 easily

Why would five hundred and five be same as one?

Has the laser at Magurele, Romania reached a tenth of the Sun's power?

How do I fix the group tension caused by my character stealing and possibly killing without provocation?

If Captain Marvel (MCU) were to have a child with a human male, would the child be human or Kree?

Is there a reason to prefer HFS+ over APFS for disk images in High Sierra and/or Mojave?

Giving feedback to someone without sounding prejudiced

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

Proving an identity involving cross products and coplanar vectors

Does Doodling or Improvising on the Piano Have Any Benefits?

Can I cause damage to electrical appliances by unplugging them when they are turned on?

Alignment of six matrices

How do I prevent inappropriate ads from appearing in my game?

Anime with legendary swords made from talismans and a man who could change them with a shattered body

Can I say "fingers" when referring to toes?

Can you identify this lizard-like creature I observed in the UK?

How to leave product feedback on macOS?



I need to know about 'source' and the use of 'bashrc' in context to installing any package in ROS



2019 Community Moderator ElectionHow can I source the bashrc file every time I 'clear'Is it OK to use “.” to run files instead of source - in .bashrc in Ubuntu and OS X?Unable to source .profile and .nvm/nvm.sh from .bashrcWhy does tmux mess up my Ubuntu login, though it works ok once logged in for new windows?Why doesn't my bash terminal recognize any command in the shell?bash: messed up display for long linesWhat's the difference between .bashrc and .inputrcAvoid sourcing scripts multiple timesHow to set environment variables to path so it can be read from GUI and command line from the same program?When should I use .bashrc and when .profile?










0















I am trying to install Robot Operating system (ROS)in my system. At some point I need to use the following:



echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc


Then the following



source ~/.bashrc[![enter image description here][1]][1]


Once I do this in the terminal, it shows



bash: /home/user_name/catkin_ws/devel/setup.bash: No such file or directory


I am unable to figure out the mistake.



Note: source /opt/ros/indigo/setup.bash contains the following.



content of setup.bash










share|improve this question
























  • What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

    – terdon
    Feb 23 '16 at 18:46















0















I am trying to install Robot Operating system (ROS)in my system. At some point I need to use the following:



echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc


Then the following



source ~/.bashrc[![enter image description here][1]][1]


Once I do this in the terminal, it shows



bash: /home/user_name/catkin_ws/devel/setup.bash: No such file or directory


I am unable to figure out the mistake.



Note: source /opt/ros/indigo/setup.bash contains the following.



content of setup.bash










share|improve this question
























  • What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

    – terdon
    Feb 23 '16 at 18:46













0












0








0








I am trying to install Robot Operating system (ROS)in my system. At some point I need to use the following:



echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc


Then the following



source ~/.bashrc[![enter image description here][1]][1]


Once I do this in the terminal, it shows



bash: /home/user_name/catkin_ws/devel/setup.bash: No such file or directory


I am unable to figure out the mistake.



Note: source /opt/ros/indigo/setup.bash contains the following.



content of setup.bash










share|improve this question
















I am trying to install Robot Operating system (ROS)in my system. At some point I need to use the following:



echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc


Then the following



source ~/.bashrc[![enter image description here][1]][1]


Once I do this in the terminal, it shows



bash: /home/user_name/catkin_ws/devel/setup.bash: No such file or directory


I am unable to figure out the mistake.



Note: source /opt/ros/indigo/setup.bash contains the following.



content of setup.bash







bashrc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 '18 at 9:16









Rui F Ribeiro

41.6k1483141




41.6k1483141










asked Feb 23 '16 at 18:22









user157923user157923

11




11












  • What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

    – terdon
    Feb 23 '16 at 18:46

















  • What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

    – terdon
    Feb 23 '16 at 18:46
















What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

– terdon
Feb 23 '16 at 18:46





What's in /opt/ros/indigo/setup.bash? Does it contain a line referring to /home/user_name/catkin_ws/devel/setup.bash? Were you supposed to replace user_name with your actual user name? Please edit your question and give us more details.

– terdon
Feb 23 '16 at 18:46










2 Answers
2






active

oldest

votes


















0














One thing you can try to use to diagnose your problem are the -x and -v options. They enables command tracing. (See the bash man page for more). -x shows commands after command substitution and -v shows them before.



set -x # turn option on
source ~/.bashrc[![enter image description here][1]][1]
set +x # turn option off


Being able to see the commands executed may give you insight into what is going wrong.






share|improve this answer
































    0














    The /opt/ros/indigo/setup.bash essentially attempts to do this:



     CATKIN_SHELL=bash
    cd /opt/ros/indigo
    _CATKIN_SETUP_DIR="/opt/ros/indigo"
    . "$_CATKIN_SETUP_DIR/setup.sh"


    The original script tries to extract the absolute pathname of setup.bash from $BASH_SOURCE[0], switch to that directory, and record the directory part of the path as environment variable _CATKIN_SETUP_DIR.



    Finally, it will attempt to source setup.sh from the path specified by _CATKIN_SETUP_DIR environment variable.



    Are you using a shell other than bash? (If you don't know, please run echo $0; echo $SHELL and add the results into your question post.)



    Analysis of the line:



    _CATKIN_SETUP_DIR=$(builtin cd "`dirname "$BASH_SOURCE[0]"`" > /dev/null && pwd)


    For a shell other than bash, the $BASH_SOURCE[0] would most likely expand into an empty string, then dirname "" results ., builtin cd . will change nothing and be successful, and pwd after that will cause the current directory to be captured as the new value for _CATKIN_SETUP_DIR, which doesn't seem to match the likely intention of the script writer.






    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%2f265289%2fi-need-to-know-about-source-and-the-use-of-bashrc-in-context-to-installing-a%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









      0














      One thing you can try to use to diagnose your problem are the -x and -v options. They enables command tracing. (See the bash man page for more). -x shows commands after command substitution and -v shows them before.



      set -x # turn option on
      source ~/.bashrc[![enter image description here][1]][1]
      set +x # turn option off


      Being able to see the commands executed may give you insight into what is going wrong.






      share|improve this answer





























        0














        One thing you can try to use to diagnose your problem are the -x and -v options. They enables command tracing. (See the bash man page for more). -x shows commands after command substitution and -v shows them before.



        set -x # turn option on
        source ~/.bashrc[![enter image description here][1]][1]
        set +x # turn option off


        Being able to see the commands executed may give you insight into what is going wrong.






        share|improve this answer



























          0












          0








          0







          One thing you can try to use to diagnose your problem are the -x and -v options. They enables command tracing. (See the bash man page for more). -x shows commands after command substitution and -v shows them before.



          set -x # turn option on
          source ~/.bashrc[![enter image description here][1]][1]
          set +x # turn option off


          Being able to see the commands executed may give you insight into what is going wrong.






          share|improve this answer















          One thing you can try to use to diagnose your problem are the -x and -v options. They enables command tracing. (See the bash man page for more). -x shows commands after command substitution and -v shows them before.



          set -x # turn option on
          source ~/.bashrc[![enter image description here][1]][1]
          set +x # turn option off


          Being able to see the commands executed may give you insight into what is going wrong.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 16 '16 at 15:04









          Pierre.Vriens

          1,00251216




          1,00251216










          answered Mar 18 '16 at 21:54









          Greg TarsaGreg Tarsa

          34927




          34927























              0














              The /opt/ros/indigo/setup.bash essentially attempts to do this:



               CATKIN_SHELL=bash
              cd /opt/ros/indigo
              _CATKIN_SETUP_DIR="/opt/ros/indigo"
              . "$_CATKIN_SETUP_DIR/setup.sh"


              The original script tries to extract the absolute pathname of setup.bash from $BASH_SOURCE[0], switch to that directory, and record the directory part of the path as environment variable _CATKIN_SETUP_DIR.



              Finally, it will attempt to source setup.sh from the path specified by _CATKIN_SETUP_DIR environment variable.



              Are you using a shell other than bash? (If you don't know, please run echo $0; echo $SHELL and add the results into your question post.)



              Analysis of the line:



              _CATKIN_SETUP_DIR=$(builtin cd "`dirname "$BASH_SOURCE[0]"`" > /dev/null && pwd)


              For a shell other than bash, the $BASH_SOURCE[0] would most likely expand into an empty string, then dirname "" results ., builtin cd . will change nothing and be successful, and pwd after that will cause the current directory to be captured as the new value for _CATKIN_SETUP_DIR, which doesn't seem to match the likely intention of the script writer.






              share|improve this answer



























                0














                The /opt/ros/indigo/setup.bash essentially attempts to do this:



                 CATKIN_SHELL=bash
                cd /opt/ros/indigo
                _CATKIN_SETUP_DIR="/opt/ros/indigo"
                . "$_CATKIN_SETUP_DIR/setup.sh"


                The original script tries to extract the absolute pathname of setup.bash from $BASH_SOURCE[0], switch to that directory, and record the directory part of the path as environment variable _CATKIN_SETUP_DIR.



                Finally, it will attempt to source setup.sh from the path specified by _CATKIN_SETUP_DIR environment variable.



                Are you using a shell other than bash? (If you don't know, please run echo $0; echo $SHELL and add the results into your question post.)



                Analysis of the line:



                _CATKIN_SETUP_DIR=$(builtin cd "`dirname "$BASH_SOURCE[0]"`" > /dev/null && pwd)


                For a shell other than bash, the $BASH_SOURCE[0] would most likely expand into an empty string, then dirname "" results ., builtin cd . will change nothing and be successful, and pwd after that will cause the current directory to be captured as the new value for _CATKIN_SETUP_DIR, which doesn't seem to match the likely intention of the script writer.






                share|improve this answer

























                  0












                  0








                  0







                  The /opt/ros/indigo/setup.bash essentially attempts to do this:



                   CATKIN_SHELL=bash
                  cd /opt/ros/indigo
                  _CATKIN_SETUP_DIR="/opt/ros/indigo"
                  . "$_CATKIN_SETUP_DIR/setup.sh"


                  The original script tries to extract the absolute pathname of setup.bash from $BASH_SOURCE[0], switch to that directory, and record the directory part of the path as environment variable _CATKIN_SETUP_DIR.



                  Finally, it will attempt to source setup.sh from the path specified by _CATKIN_SETUP_DIR environment variable.



                  Are you using a shell other than bash? (If you don't know, please run echo $0; echo $SHELL and add the results into your question post.)



                  Analysis of the line:



                  _CATKIN_SETUP_DIR=$(builtin cd "`dirname "$BASH_SOURCE[0]"`" > /dev/null && pwd)


                  For a shell other than bash, the $BASH_SOURCE[0] would most likely expand into an empty string, then dirname "" results ., builtin cd . will change nothing and be successful, and pwd after that will cause the current directory to be captured as the new value for _CATKIN_SETUP_DIR, which doesn't seem to match the likely intention of the script writer.






                  share|improve this answer













                  The /opt/ros/indigo/setup.bash essentially attempts to do this:



                   CATKIN_SHELL=bash
                  cd /opt/ros/indigo
                  _CATKIN_SETUP_DIR="/opt/ros/indigo"
                  . "$_CATKIN_SETUP_DIR/setup.sh"


                  The original script tries to extract the absolute pathname of setup.bash from $BASH_SOURCE[0], switch to that directory, and record the directory part of the path as environment variable _CATKIN_SETUP_DIR.



                  Finally, it will attempt to source setup.sh from the path specified by _CATKIN_SETUP_DIR environment variable.



                  Are you using a shell other than bash? (If you don't know, please run echo $0; echo $SHELL and add the results into your question post.)



                  Analysis of the line:



                  _CATKIN_SETUP_DIR=$(builtin cd "`dirname "$BASH_SOURCE[0]"`" > /dev/null && pwd)


                  For a shell other than bash, the $BASH_SOURCE[0] would most likely expand into an empty string, then dirname "" results ., builtin cd . will change nothing and be successful, and pwd after that will cause the current directory to be captured as the new value for _CATKIN_SETUP_DIR, which doesn't seem to match the likely intention of the script writer.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 18 hours ago









                  telcoMtelcoM

                  19.4k12448




                  19.4k12448



























                      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%2f265289%2fi-need-to-know-about-source-and-the-use-of-bashrc-in-context-to-installing-a%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

                      getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                      Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                      Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.