Problem installing fenicsx on ubuntu 20:04

Good morning.

I try to install fenicsx on ubuntu20.04.
To do so I used the following instructions

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenicsx

Unfortunately I obtained the following message (in French):

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Certains paquets ne peuvent être installés. Ceci peut signifier
que vous avez demandé l'impossible, ou bien, si vous utilisez
la distribution unstable, que certains paquets n'ont pas encore
été créés ou ne sont pas sortis d'Incoming.
L'information suivante devrait vous aider à résoudre la situation : 

Les paquets suivants contiennent des dépendances non satisfaites :
 fenicsx : Dépend: libdolfinx-dev (>= 1:0.4~) mais ne sera pas installé
           Dépend: python3-dolfinx (>= 1:0.4~) mais ne sera pas installé
           Dépend: python3-ffcx (>= 1:0.4~) mais ne sera pas installé
E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».

Which can be translated in

Reading of package lists... Done
Building the dependency tree       
Reading of status information... Done
Some packages cannot be installed. This may mean that
that you have asked for the impossible, or, if you are using the
unstable distribution, that some packages have not yet been created or
created or not released from Incoming.
The following information should help you to solve the situation: 

The following packages contain unmet dependencies:
 fenicsx: Depend: libdolfinx-dev (>= 1:0.4~) but will not be installed
           Dependency: python3-dolfinx (>= 1:0.4~) but will not be installed
           Depends: python3-ffcx (>= 1:0.4~) but will not be installed
E: Unable to fix problems, faulty packages are in "keep as is" mode.

I tried to find a solution on internet but i was not able to fix this issue.
Does anyone have a suggestion to fix this issue?
Thank you in avance

After update and before installing fenicsx, try running upgrade to ensure all libraries are up to date

sudo apt-get update
sudo apt-get upgrade

For good measure you could also try dist-upgrade after upgrade to ensure no library upgrades got blocked

sudo apt-get dist-upgrade

Thank you dparsons.

I have tried the solution you suggested but it does not worK.
I obtained

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Les paquets suivants ont été conservés :
  ubuntu-advantage-tools
0 mis à jour, 0 nouvellement installés, 0 à enlever et 1 non mis à jour.

and I obtained the same message when I try to install fenicsx.

I’ve confirmed the installation steps pass on a fresh installation of ubuntu 20.04 (focal). I needed to run update before installing software-properties-common, but apart from that it went smoothly (I didn’t need to run upgrade or dist-upgrade on the fresh installation).

Looks like something else installed on your system is getting in the way. The reference to ubuntu-advantage-tools is strange. Has your system package configuration placed a hold on any packages (including ubuntu-advantage-tools) that would prevent them from getting upgraded?

Installation tends to go more smoothly on more recent releases (i.e. ubuntu 22.04 jammy). If you’re able to upgrade to the 22.04 jammy release, it might help avoid more frustrations.

I remove the ubuntu-advantage-tools package but I still have the same error.
I will try to update ubuntu

X

I installed a fresh ubuntu 20:04.
Installation of fenicxs ran smothly
I’ll try to install ubuntu 22:04 later

Thank you for helping

2 Likes