I have a mac book pro and i am only able to run root macros on my terminal but I need to run the tutorials.
Pls, how can I run the tutorials on my terminal?
MY TERMINAL OUTPUT
abis-MacBook-Pro:~ abi$ /Users/abi/root/tutorials/hsimple.C
-bash: /Users/abi/root/tutorials/hsimple.C: Permission denied
abis-MacBook-Pro:~ abi$ cd root/bin
abis-MacBook-Pro:bin abi$ ./root.exe
------------------------------------------------------------
| Welcome to ROOT 6.10/00 http://root.cern.ch |
| (c) 1995-2017, The ROOT Team |
| Built for macosx64 |
| From tag v6-10-00, 13 June 2017 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
//hsimple.C is in the ROOT tutorials directory
root [0] .x hsimple.C
Error in <TApplication::ExecuteFile>: macro hsimple.C not found in path .:/Users/abi/root/macros
root [1]
You will find all the tutorial in $ROOTSYS/tutorials. cd ro this directory (or copy the tutorials from there) and the you will be able to execute them as at the ROOT prompt. As @amadio said this is the only way to run ROOT macros.
Hi,
that error is normal. hsimple.C is, in fact, not in â/Users/abi/root/macrosâ.
Open your terminal, setup ROOTâs environment (if you donât do it automatically in your .bashrc script) with source /Users/abi/root/bin/thisroot.sh, then do a cd /Users/abi/root/tutorials, and from the root prompt you can now type .x hsimple.C because hsimple.C is now in your current directory.
At which point? I just suggested to cd into the tutorials directory and the execute root from there.
If that does not work you might have some issues with your ROOT installation.
You are really not giving us much information here
How did you install ROOT? Which command gives you a permission denied error exactly?
If your aim is simply running hsimple.C from the ROOT prompt, you can do source /path/to/root/bin/thisroot.sh (where I think your /path/to/root is /Users/abi/root) and then start root (just type root and press enter). From ROOTâs prompt you can execute any tutorial if you know its location. I think in your case it should be root[0] .x /Users/abi/root/tutorials/hsimple.C
but you probably know your system better than me
I have tried to modify the info you gave in your 1st post. Several things were wrong. It should be something like:
$ cd ~/root
$ . bin/thisroot.sh
$ cd tutorials
$ root
------------------------------------------------------------
| Welcome to ROOT 6.10/00 http://root.cern.ch |
| (c) 1995-2017, The ROOT Team |
| Built for macosx64 |
| From tag v6-10-00, 13 June 2017 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
root [0] .x hsimple.C
root [1]
Note that the 2nd line should be put in your .bashrc file to avoid re-typeing this commend each time you start a new terminal.
The message permission denied you get is because your tried to execute hsimple.C at the shell prompt ⌠it is a ROOT macro ⌠it should be executed in ROOTâŚ
I assume ROOT binaries are installed in your directory ~/root ⌠it seems it is, given the terminal output you posted.