# Error installing root on ubuntu

**URL:** <https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698>\
**Category:** ROOT\
**Created:** [July 16, 2023, 7:28pm UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698 "2023-07-16T19:28:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ymahmoud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ymahmoud/32/33917_2.png) [@ymahmoud](https://root-forum.cern.ch/u/ymahmoud)\
**Post date:** [July 16, 2023, 7:28pm UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/1 "2023-07-16T19:28:10Z")

</div>

I am trying to install root 6.28.04 from source on ubuntu 20.04 but I get this error:

error: expected nested-name-specifier before ‘TBufferMergerFile

and installation terminates

The reason why I am installing root from source and not a precompiled distribution is because libdelphes is not installed in the precompiled dist and I get this error:  
fatal error: ‘libDelphes’ file not found

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [July 17, 2023, 7:50am UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/2 "2023-07-17T07:50:46Z")

</div>

Hi @ymahmoud ,

Our precompiled binaries work on ubuntu20.04, I am not sure what `libDelphes` has to do with it. Irrespective of that, you could always install ROOT via `conda` [Installing ROOT - ROOT](https://root.cern/install/#conda) (see [this post](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/8) for a faster installation).

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![ymahmoud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ymahmoud/32/33917_2.png) [@ymahmoud](https://root-forum.cern.ch/u/ymahmoud)\
**Post date:** [July 17, 2023, 2:48pm UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/3 "2023-07-17T14:48:05Z")

</div>

Thank you @vpadulan !

The problem is I get an error when using mamba or conda that looks like this when I run root:

error: unsupported option ‘–ptrcheck’  
Warning in cling::IncrementalParser::CheckABICompatibility():  
Possible C++ standard library mismatch, compiled with **GLIBCXX** ‘20200808’  
Extraction of runtime standard library version was: ‘20220628’  
terminate called after throwing an instance of ‘std::logic\_error’  
what(): basic\_string::\_M\_construct null not valid

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [July 17, 2023, 4:18pm UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/4 "2023-07-17T16:18:06Z")

</div>

Dear @ymahmoud ,

I think you are using a different conda/Python environment when using ROOT w.r.t. the conda/Python environment you used to install ROOT.

This is how I installed and used ROOT on a fresh ubuntu 20.04 docker image:

```auto
$: docker run --rm -it ubuntu:20.04
$: apt-get update && apt-get install curl
$: curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
$: bash Mambaforge-$(uname)-$(uname -m).sh -b
$: source /root/mambaforge/bin/activate
$: mamba create -n myenv root
$: conda activate myenv
$: python
>>> import ROOT
[some unexpected warning here, but not breaking ROOT functionality]
/root/mambaforge/envs/myenv/etc/cling/std.modulemap:257:29: warning: unknown attribute 'optional' [-Wignored-attributes]
>>> ROOT.RDataFrame(100).Count().GetValue()
100

```

I wasn’t expecting the warning from cling, and I opened a [github issue](https://github.com/root-project/root/issues/13265) to track it, but it should definitely not tell you about the standard C++ library mismatch.

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![ymahmoud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ymahmoud/32/33917_2.png) [@ymahmoud](https://root-forum.cern.ch/u/ymahmoud)\
**Post date:** [July 18, 2023, 8:54am UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/5 "2023-07-18T08:54:31Z")

</div>

So How Can I fix this?

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [July 18, 2023, 8:55am UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/6 "2023-07-18T08:55:54Z")

</div>

As I said, are you sure you are using the same environment for both installing and using ROOT? This is really something generic, for every package you use you should make sure you have the same environment.

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 1, 2023, 8:56am UTC](https://root-forum.cern.ch/t/error-installing-root-on-ubuntu/55698/7 "2023-08-01T08:56:22Z")

</div>

Closed on August 1, 2023, 8:56am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
