Problem running root after update to Mac Catalina

Dear all,

I have a Mac and today I updated the OS to the new one, called Catalina.
The problem is that now root is not working anymore.
If I do on the shell root name_prog.cpp where name_prog is also the name of the main function of it, at the beginning it gave me lots of errors and now it doesn’t recognize also the command root.
Can you help me with this problem?
I did also chsh -s /bin/zsh

Please read tips for efficient and successful posting and posting code

ROOT Version: 6/6.12
Platform: Not Provided
Compiler: zsh

What do you get it you type only:




zsh: command not found: root

I checked and I have still installed home-brew and Cmake

That means the $PATH variable does not contain the directory where the root binary is.
what do you get when you do:

echo $PATH



when I do echo $PATH I get /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Library/TeX/texbin:/opt/X11/bin

and when I do echo $ROOTSYS I get a empty line

$ROOTSYS should point where ROOT is installed on your system. And $PATH should contain the path corresponding to $ROOTSYS/bin . This is normally set when you do:

cd where_root_is_installed
. bin/

this means that ROOT is no more installed on my laptop? I try to follow the path above but I can’t arrive to the directory. What can I do to run correctly root again?

Which path ? you do not know where root is installed on your machine ?

With the search icon top right of your Mac top bar, search for “root.exe” then “show all in finder” . Then point on root.exe in that finder window. It should tell you (at the bottom of the finder window) where the root.exe binary is.

Ok, I went where my root is installed and did . bin/thisroot but when I try again to open root it doesn’t work.

Maybe there is something that I don’t understand.

if I type root on this folder I get:

#include <string>
  | Welcome to ROOT 6.12/06       |
  |                               (c) 1995-2017, The ROOT Team |
  | Built for macosx64                                         |
  | From tag v6-12-06, 9 February 2018                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |

input_line_9:1:10: fatal error: 'iostream' file not found
#include <iostream>
root [0] 

and there is some error because I’m not doing anything, I just done root.
If I go in any other folder the output from typing root is zsh: command not found: root

I do not know the exact state of your machine. May be try to re-install root ? It might be there is some incompatibilities with the root binary you have and the new MacOsX. I do not see this problem on my Catalina machine because I re-install root from sources several times per day. Also have you updated XCode ?

I updated Xcode when the Apple made the realest some days ago and I have no problem. The problem raised today with Catalina.
I will try to re-install root but I’m not an expert. Can you give me some tips to uninstall root and re-install it? I can’t find a way to do it online and I’m not able.

To download binaries use this page:

Reinstalling from sources is explained at the bottom of this page:

To uninstall root simply remove the folder (and its content) where it is installed.

No need to reinstall root.

With the update to Catalina some of the SDKs for 10.14 will have been removed. reinstall command line tools in the usual way

xcode-select --install

This solved the problem for me. There will be a painful setup period where you have to approve the use of every single library since Catalina only allows software that has been notarised by Apple. This may happen each time you use a new library.

To check look here

ls /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

1 Like

You will get app up message sharing:

" “” cannot be opened because the developer cannot be verified."

Select cancel…

Go to -> System Preferences -> Security -> Click “Allow Anyway”

Run again, select open. Repeat countless times. Once you have done them all it will run.

I had the same problem after this Mac update. Doing what you suggested solved my problem.
Thank you.

Hello, I tried as your guidance. But after that, there still have some errors:

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
  LC_ALL=C /Library/Developer/CommandLineTools/usr/bin/c++   -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk'
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
input_line_3:37:10: fatal error: 'string' file not found
#include <string>
  | Welcome to ROOT 6.18/04         |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for macosx64 on Sep 11 2019, 15:38:23                |
  | From tags/v6-18-04@v6-18-04                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |

input_line_7:1:10: fatal error: 'iostream' file not found
#include <iostream>
root [0] 

Can you give me some advice?

This could be one of two things,

  1. You do not have the headers installed. Run xcode-select --install

Check the install: ls /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

  1. Note that your terminal may not have permission to access the directories which could cause problems

Go to Control panel -> Privacy -> Full Disk Access -> Select your terminal app.

I Use iTerm…

4 posts were split to a new topic: Mac Cataline: “cannot be opened because the developer cannot be verified”