1

I am extremely new to Linux and I'm using the Chromebook's Linux beta which I believe is ubuntu. I'm trying to use CERN's root software to display a function's graph but it gives me a massive error when it tries to give me the actual graph. My syntax is correct I just don't know how to get the Chromebook to let Linux show me a graphic.

Here's the code I put in

f = new TF1("f","x^2",-2,2)
f->Draw()

and here's a link to the error message

https://paste.ubuntu.com/p/FyMb4yvB8X/

Root uses C++

If youre wondering how I installed ROOT I used this guide under 30.4

https://root.cern.ch/root/html534/guides/users-guide/InstallandBuild.html#installing-precompiled-binaries

I downloaded the ROOT prerequisites from this page

https://root.cern.ch/build-prerequisites

And then I used this to launch it

. <pathname>/root/bin/thisroot.sh
root

1 Answers1

1

First, install the following dependency:

sudo apt install libgif-dev

Now, run root and then run your commands. If you still get the same error, you need to download the Ubuntu 18.04 version of CERN root from here. This version is listed as "Ubuntu 18" on the downloads page.


Here is the explanation:

Your error says that you are missing the file: libgif.so.4 . You can install apt-file to help you locate what package contains a file you are searching for.

First, install apt-file:

sudo apt update
sudo apt install apt-file
sudo apt-file update

Then, search for libgif.so:

apt-file search libgif.so

This should show you that the file libgif.so.4 is provided by the package libgif4 or that the file libgif.so.7 is provided by libgif7.

The package libgif7 is available on Ubuntu Bionic (18.04) whereas libgif4 is available on Ubuntu Xenial (16.04).

The "dev" package libgif-dev will install whatever version is available as a dependency (libgif4 or libgif7). However, the file listed in the error is the version for 16.04 so if you still get the error after installing libgif-dev, then you need to download the version of CERN root that uses libgif.so.7 (18.04 version) instead of libgif.so.4.

mchid
  • 1,421
  • 2
  • 15
  • 21
  • You can also search for package names using `apt-cache search` like in this example: `apt-cache search libgif` – mchid Nov 28 '19 at 07:01
  • Additionally, `apt-cache show` will show information about a package, including the dependencies that will also be installed, like in this example: `apt-cache show libgif-dev` – mchid Nov 28 '19 at 07:06