Poisson Equation demo code not working

Hello, I am trying to run the Poisson demo to see if my installation is working properly. I run the following few lines (my version is 0.6.0 and I used a conda-forge to install it. My platform is Linux - RHEL) -

import numpy as np

import ufl
from dolfinx import fem, io, mesh, plot
from ufl import ds, dx, grad, inner

from mpi4py import MPI
from petsc4py.PETSc import ScalarType

msh = mesh.create_rectangle(comm=MPI.COMM_WORLD,
                            points=((0.0, 0.0), (2.0, 1.0)), n=(32, 16),
                            cell_type=mesh.CellType.triangle,)

V = fem.FunctionSpace(msh, ("Lagrange", 1))

On the line V = fem.FunctionSpace(msh, ("Lagrange", 1)), I get the following error:

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py:185, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
    184 try:
--> 185     self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
    186 except DistutilsExecError as msg:

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py:1041, in CCompiler.spawn(self, cmd, **kwargs)
   1040 def spawn(self, cmd, **kwargs):
-> 1041     spawn(cmd, dry_run=self.dry_run, **kwargs)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/spawn.py:70, in spawn(cmd, search_path, verbose, dry_run, env)
     69     cmd = cmd[0]
---> 70 raise DistutilsExecError(
     71     "command {!r} failed with exit code {}".format(cmd, exitcode)
     72 )

DistutilsExecError: command '/usr/lib64/ccache/gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

CompileError                              Traceback (most recent call last)
File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/cffi/ffiplatform.py:51, in _build(tmpdir, ext, compiler_verbose, debug)
     50 distutils.log.set_verbosity(compiler_verbose)
---> 51 dist.run_command('build_ext')
     52 cmd_obj = dist.get_command_obj('build_ext')

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/dist.py:1221, in Distribution.run_command(self, command)
   1218 # Postpone defaults until all explicit configuration is considered
   1219 # (setup() args, config files, command line and plugins)
-> 1221 super().run_command(command)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/dist.py:988, in Distribution.run_command(self, command)
    987 cmd_obj.ensure_finalized()
--> 988 cmd_obj.run()
    989 self.have_run[command] = 1

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/command/build_ext.py:84, in build_ext.run(self)
     83 old_inplace, self.inplace = self.inplace, 0
---> 84 _build_ext.run(self)
     85 self.inplace = old_inplace

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py:345, in build_ext.run(self)
    344 # Now actually compile and link everything.
--> 345 self.build_extensions()

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py:467, in build_ext.build_extensions(self)
    466 else:
--> 467     self._build_extensions_serial()

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py:493, in build_ext._build_extensions_serial(self)
    492 with self._filter_build_errors(ext):
--> 493     self.build_extension(ext)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/command/build_ext.py:246, in build_ext.build_extension(self, ext)
    245     self.compiler = self.shlib_compiler
--> 246 _build_ext.build_extension(self, ext)
    247 if ext._needs_stub:

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py:548, in build_ext.build_extension(self, ext)
    546     macros.append((undef,))
--> 548 objects = self.compiler.compile(
    549     sources,
    550     output_dir=self.build_temp,
    551     macros=macros,
    552     include_dirs=ext.include_dirs,
    553     debug=self.debug,
    554     extra_postargs=extra_args,
    555     depends=ext.depends,
    556 )
    558 # XXX outdated variable, kept here in case third-part code
    559 # needs it.

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py:600, in CCompiler.compile(self, sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends)
    599         continue
--> 600     self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    602 # Return *all* object filenames, not just the ones we just built.

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py:187, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
    186 except DistutilsExecError as msg:
--> 187     raise CompileError(msg)

CompileError: command '/usr/lib64/ccache/gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

VerificationError                         Traceback (most recent call last)
Cell In[5], line 1
----> 1 V = fem.FunctionSpace(msh, ("Lagrange", 1))

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/dolfinx/fem/function.py:487, in FunctionSpace.__init__(self, mesh, element, cppV, form_compiler_options, jit_options)
    484     super().__init__(mesh.ufl_domain(), ufl_element)
    486 # Compile dofmap and element and create DOLFIN objects
--> 487 (self._ufcx_element, self._ufcx_dofmap), module, code = jit.ffcx_jit(
    488     mesh.comm, self.ufl_element(), form_compiler_options=form_compiler_options,
    489     jit_options=jit_options)
    491 ffi = module.ffi
    492 cpp_element = _cpp.fem.FiniteElement(
    493     ffi.cast("uintptr_t", ffi.addressof(self._ufcx_element)))

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/dolfinx/jit.py:56, in mpi_jit_decorator.<locals>.mpi_jit(comm, *args, **kwargs)
     51 @functools.wraps(local_jit)
     52 def mpi_jit(comm, *args, **kwargs):
     53 
     54     # Just call JIT compiler when running in serial
     55     if comm.size == 1:
---> 56         return local_jit(*args, **kwargs)
     58     # Default status (0 == ok, 1 == fail)
     59     status = 0

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/dolfinx/jit.py:206, in ffcx_jit(ufl_object, form_compiler_options, jit_options)
    204     r = ffcx.codegeneration.jit.compile_forms([ufl_object], options=p_ffcx, **p_jit)
    205 elif isinstance(ufl_object, ufl.FiniteElementBase):
--> 206     r = ffcx.codegeneration.jit.compile_elements([ufl_object], options=p_ffcx, **p_jit)
    207 elif isinstance(ufl_object, ufl.Mesh):
    208     r = ffcx.codegeneration.jit.compile_coordinate_maps(
    209         [ufl_object], options=p_ffcx, **p_jit)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/ffcx/codegeneration/jit.py:144, in compile_elements(elements, options, cache_dir, timeout, cffi_extra_compile_args, cffi_verbose, cffi_debug, cffi_libraries)
    141         decl += element_template.format(name=names[i * 2])
    142         decl += dofmap_template.format(name=names[i * 2 + 1])
--> 144     impl = _compile_objects(decl, elements, names, module_name, p, cache_dir,
    145                             cffi_extra_compile_args, cffi_verbose, cffi_debug, cffi_libraries)
    146 except Exception:
    147     # remove c file so that it will not timeout next time
    148     c_filename = cache_dir.joinpath(module_name + ".c")

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/ffcx/codegeneration/jit.py:270, in _compile_objects(decl, ufl_objects, object_names, module_name, options, cache_dir, cffi_extra_compile_args, cffi_verbose, cffi_debug, cffi_libraries)
    268 f = io.StringIO()
    269 with redirect_stdout(f):
--> 270     ffibuilder.compile(tmpdir=cache_dir, verbose=True, debug=cffi_debug)
    271 s = f.getvalue()
    272 if (cffi_verbose):

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/cffi/api.py:725, in FFI.compile(self, tmpdir, verbose, target, debug)
    723     raise ValueError("set_source() must be called before compile()")
    724 module_name, source, source_extension, kwds = self._assigned_source
--> 725 return recompile(self, module_name, source, tmpdir=tmpdir,
    726                  target=target, source_extension=source_extension,
    727                  compiler_verbose=verbose, debug=debug, **kwds)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/cffi/recompiler.py:1564, in recompile(ffi, module_name, preamble, tmpdir, call_c_compiler, c_file, source_extension, extradir, compiler_verbose, target, debug, **kwds)
   1562         print('%s %r' % (msg, os.path.abspath(tmpdir)))
   1563     os.chdir(tmpdir)
-> 1564     outputfilename = ffiplatform.compile('.', ext,
   1565                                          compiler_verbose, debug)
   1566 finally:
   1567     os.chdir(cwd)

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/cffi/ffiplatform.py:22, in compile(tmpdir, ext, compiler_verbose, debug)
     20 saved_environ = os.environ.copy()
     21 try:
---> 22     outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
     23     outputfilename = os.path.abspath(outputfilename)
     24 finally:
     25     # workaround for a distutils bugs where some env vars can
     26     # become longer and longer every time it is used

File ~/.conda/envs/Fenics_env/lib/python3.10/site-packages/cffi/ffiplatform.py:58, in _build(tmpdir, ext, compiler_verbose, debug)
     55         distutils.log.set_threshold(old_level)
     56 except (distutils.errors.CompileError,
     57         distutils.errors.LinkError) as e:
---> 58     raise VerificationError('%s: %s' % (e.__class__.__name__, e))
     59 #
     60 return soname

VerificationError: CompileError: command '/usr/lib64/ccache/gcc' failed with exit code 1

I would appreciate any help with this. Thank you!