No installation candidate for libopenmpi2

Asked by

I've been trying to install openFOAM on 18.04 and get the following error after sudo apt-get install openfoam6:

The following packages have unmet dependencies.
 openfoam6 : Depends: libopenmpi2 but it is not installable
E: Unable to correct problems, you have held broken packages.

I tried running sudo apt-get install libopenmpi2 and get:

E: Package 'libopenmpi2' has no installation candidate

Any thoughts?

Question information

English Edit question
Ubuntu openmpi Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :

libopenmpi2 is in the "universe" repository. Do you have it enabled in your package management configuration?

What is the output of the commands

uname -a
lsb_release -crid
apt-cache policy

Revision history for this message (laurendransfield) said :

Yeah, I have universe:

lauren@lauren-Z370P-D3:~$ sudo add-apt-repository universe
'universe' distribution component is already enabled for all sources.

Output of other commands:

lauren@lauren-Z370P-D3:~$ uname -a
Linux lauren-ubuntu 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

lauren@lauren-Z370P-D3:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic

lauren@lauren-Z370P-D3:~$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 cosmic/main amd64 Packages
     release n=cosmic,c=main,b=amd64
 500 bionic/main amd64 Packages
     release n=bionic,c=main,b=amd64
 500 cosmic-security/multiverse i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=multiverse,b=i386
 500 cosmic-security/multiverse amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=multiverse,b=amd64
 500 cosmic-security/universe i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=universe,b=i386
 500 cosmic-security/universe amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=universe,b=amd64
 500 cosmic-security/main i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=main,b=i386
 500 cosmic-security/main amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-security,n=cosmic,l=Ubuntu,c=main,b=amd64
 100 cosmic-backports/universe i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-backports,n=cosmic,l=Ubuntu,c=universe,b=i386
 100 cosmic-backports/universe amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-backports,n=cosmic,l=Ubuntu,c=universe,b=amd64
 500 cosmic-updates/multiverse i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=multiverse,b=i386
 500 cosmic-updates/multiverse amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=multiverse,b=amd64
 500 cosmic-updates/universe i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=universe,b=i386
 500 cosmic-updates/universe amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=universe,b=amd64
 500 cosmic-updates/main i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=main,b=i386
 500 cosmic-updates/main amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic-updates,n=cosmic,l=Ubuntu,c=main,b=amd64
 500 cosmic/multiverse i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=multiverse,b=i386
 500 cosmic/multiverse amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=multiverse,b=amd64
 500 cosmic/universe i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=universe,b=i386
 500 cosmic/universe amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=universe,b=amd64
 500 cosmic/restricted i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=restricted,b=i386
 500 cosmic/restricted amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=restricted,b=amd64
 500 cosmic/main i386 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=main,b=i386
 500 cosmic/main amd64 Packages
     release v=18.10,o=Ubuntu,a=cosmic,n=cosmic,l=Ubuntu,c=main,b=amd64
Pinned packages:

Revision history for this message
Manfred Hampl (m-hampl) said :

You are not running Ubuntu 18.04 (bionic), but Ubuntu 18.10 (cosmic).

In Ubuntu 18.20 the package libopenmpi2 does no more exist, because it has been replaced by libopenmpi3.

Revision history for this message
Manfred Hampl (m-hampl) said :

Sorry, typo error, should be 18.10 instead of 18.20

Can you help with this problem?

Provide an answer of your own, or ask for more information if necessary.

To post a message you must log in.