# Building ROOT 6.26/06 from source with R bindings enabled on Ubuntu 20.04 or 22.04

**URL:** <https://root-forum.cern.ch/t/building-root-6-26-06-from-source-with-r-bindings-enabled-on-ubuntu-20-04-or-22-04/51732>\
**Category:** ROOT\
**Created:** [September 27, 2022, 11:58pm UTC](https://root-forum.cern.ch/t/building-root-6-26-06-from-source-with-r-bindings-enabled-on-ubuntu-20-04-or-22-04/51732 "2022-09-27T23:58:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jwruss](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jwruss](https://root-forum.cern.ch/u/jwruss)\
**Post date:** [September 28, 2022, 1:21am UTC](https://root-forum.cern.ch/t/building-root-6-26-06-from-source-with-r-bindings-enabled-on-ubuntu-20-04-or-22-04/51732/2 "2022-09-28T01:21:04Z")

</div>

Since posting this message, I have found [this message](https://root-forum.cern.ch/t/installation-of-root-to-a-user-defined-prefix-results-in-broken-libraries-for-external-packages-r-cfitsio/39361/6). I am seeing if issuing the command

```auto
cmake -DCMAKE_INSTALL_PREFIX=../root_install -Drpath=ON -Dr=ON ../root_src

```

then issuing the command

```auto
cmake --build . -- install -j$(nproc)

```

resolves the issues I have been having on my machine where R was found by cmake. What I am unsure of now though is what @Wile_E_Coyote means when they say

> Then execute “make install”, rename the original “`<builddir>`” (so that the newly installed libraries will NOT find the originals) and try “ldd” on all newly installed libraries.

And how it applies to the steps I am describing above? What would I be renaming? root\_build? Does this mean I would temporarily rename root\_build to something else, then rename it back after issuing the command

```auto
cmake --build . -- install -j$(nproc)

```

Where would I find the libraries I would need to “ldd”?

---

_[View the full topic](https://root-forum.cern.ch/t/building-root-6-26-06-from-source-with-r-bindings-enabled-on-ubuntu-20-04-or-22-04/51732)._
