Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install ROOT which I need for work. I run Ubuntu 10.04 64 bit on virtualbox on my laptop. After extracting the tarball, I try to source the .sh file using the command as suggested in the README

$ . pathname/root/bin/thisroot.sh

It shows me the following error:

$ . /home/username/Downloads/root/bin/thisroot.sh

bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory
bash: man: No such file or directory
Command 'dirname' is available in '/usr/bin/dirname'
The command could not be located because '/usr/bin' is not included in
the PATH environment variable.
dirname: command not found
/usr/bin/env: bash: No such file or directory
Command 'grep' is available in '/bin/grep'
The command could not be located because '/bin' is not included in the
PATH environment variable.
grep: command not found
Command 'grep' is available in '/bin/grep'
The command could not be located because '/bin' is not included in the
PATH environment variable.
grep: command not found

The result of this is that it somehow deleted the PATH, because now I cannot do anything else from the command line. For example:

$ vi README
Command 'vi' is available in '/usr/bin/vi'
The command could not be located because '/usr/bin' is not included in
the PATH environment variable.
vi: command not found

$ clear
Command 'clear' is available in '/usr/bin/clear'
The command could not be located because '/usr/bin' is not included in
the PATH environment variable.
clear: command not found

I have an Ubuntu 11.04 on my desktop at home, where this installation went smoothly. I also tried this on my office mac, but I don't know what is happening here.

share|improve this question
    
You should read the things in thisroot.sh, or paste it here (or use pastebin if it's too long). –  phunehehe Jul 11 '11 at 4:22
1  
Run set -x; /path/to/thisroot.sh to see a trace of what the script is doing. –  Gilles Jul 11 '11 at 13:32
    
I'm confused about what you are trying to install. The link you have up there (root.cern.ch/drupal) goes to the ROOT system homepage. ROOT is a data analysis framework used by nuclear and particle physicists, while Drupal is a content management system. (The ROOT guys uses drupal to maintain their website, which explains the presence of the string "drupal" in that URL). –  dmckee Jul 30 '11 at 20:56
    
@dmckee corrected. I succesfully installed this on my own later that day (from source, not using binaries. The real trouble was AliROOT on Ubuntu 11.04) so I did not get back here for a while. Incidentally, I was also building a wiki on drupal at the time so that was on my mind, and it just slipped out. –  kuch nahi Jul 30 '11 at 20:59

1 Answer 1

up vote 1 down vote accepted

If you start a script by sourcing it:

. script 

or

source script 

its commands are executed in the context of this shell. You don't have to worry about disappearing paths, aliases and such; if you later start another shell, that one will not be affected.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.