# Install fenics 2019.1 on terminal ubuntu 22.04

**URL:** <https://fenicsproject.discourse.group/t/install-fenics-2019-1-on-terminal-ubuntu-22-04/12916>\
**Category:** installation\
**Created:** [December 2, 2023, 12:05am UTC](https://fenicsproject.discourse.group/t/install-fenics-2019-1-on-terminal-ubuntu-22-04/12916 "2023-12-02T00:05:33Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![francesco-ballarin](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@francesco-ballarin](https://fenicsproject.discourse.group/u/francesco-ballarin)\
**Post date:** [December 4, 2023, 9:54am UTC](https://fenicsproject.discourse.group/t/install-fenics-2019-1-on-terminal-ubuntu-22-04/12916/17 "2023-12-04T09:54:52Z")

</div>

Can you post the output of

```auto
apt list --installed | grep fenics
apt list --installed | grep ufl

```

?

I suspect that the latter is something like

```auto
python-ufl-legacy-doc/jammy,now 1:2022.3.0-2~ppa1~jammy1 all [installed,automatic]
python3-ufl-legacy/jammy,now 1:2022.3.0-2~ppa1~jammy1 all [installed,automatic]

```

If that is the case, then the issue is related to

> [@Announcement: ufl\_legacy and legacy dolfin](https://fenicsproject.discourse.group/t/announcement-ufl-legacy-and-legacy-dolfin/11583):
>
> tl;dr: UFL is no longer compatible with legacy dolfin. A ufl\_legacy package will be created to help keep old dolfin projects computing. Depending on how you use ufl, you might need to replace import ufl with import ufl\_legacy as ufl. Challenge: UFL continues to be developed alongside dolfinx (and ffcx/basix, and firedrake). The 2023 release of UFL broke compatibility with legacy dolfin (and old ffc). The use-case requiring simultaneous installation of both dolfin and dolfinx might be, for in…

Try the following

```auto
cd $HOME/.local/lib.python3.10/site-packages/cashocs
find ./ -type f -exec sed -i 's|import ufl|import ufl_legacy|g' {} \;
find ./ -type f -exec sed -i 's|ufl.Form|ufl_legacy.Form|g' {} \;
find ./ -type f -exec sed -i 's|ufl.core|ufl_legacy.core|g' {} \;
find ./ -type f -exec sed -i 's|ufl.form.Form|ufl_legacy.form.Form|g' {} \;
find ./ -type f -exec sed -i 's|ufl.replace|ufl_legacy.replace|g' {} \;
find ./ -type f -exec sed -i 's|ufl.Measure|ufl_legacy.Measure|g' {} \;
find ./ -type f -exec sed -i 's|ufl.algorithms|ufl_legacy.algorithms|g' {} \;
find ./ -type f -exec sed -i 's|ufl.log|ufl_legacy.log|g' {} \;
find ./ -type f -exec sed -i 's|ufl.Jacobian|ufl_legacy.Jacobian|g' {} \;

```

where I am trying to replace every instance of `ufl` in the code with `ufl_legacy`.

With these changes, I was able to run the demo you are intersted in.

---

_[View the full topic](https://fenicsproject.discourse.group/t/install-fenics-2019-1-on-terminal-ubuntu-22-04/12916)._
