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?
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.
bashrc
add a comment |
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.
bashrc
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 replaceuser_name
with your actual user name? Please edit your question and give us more details.
– terdon♦
Feb 23 '16 at 18:46
add a comment |
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.
bashrc
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.
bashrc
bashrc
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 replaceuser_name
with your actual user name? Please edit your question and give us more details.
– terdon♦
Feb 23 '16 at 18:46
add a comment |
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 replaceuser_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
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
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
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered 18 hours ago
telcoMtelcoM
19.4k12448
19.4k12448
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 replaceuser_name
with your actual user name? Please edit your question and give us more details.– terdon♦
Feb 23 '16 at 18:46