6

While trying to install open mpi on my Ubuntu 12.04, I am getting error unable to locate package libopenmpi-dev. What to do?

$ sudo apt-get install libopenmpi-dev openmpi-bin openmpi-doc
unable to locate package libopenmpi-dev
unable to locate package openmpi-bin
unable to locate package openmpi-doc
Tim
  • 32,274
  • 27
  • 118
  • 177
dnivog
  • 63
  • 1
  • 1
  • 4

2 Answers2

6

Try to run apt-get update before you install the openmpi package.

Also you can use the following command to search all openmpi related package, for example:

apt-cache search openmpi

If it still doesn't work, try to use a different mirror, below is GUI and easier:

sudo software-properties-gtk

Update:

@Govind

The package is definitely in the official repository (12.04): http://packages.ubuntu.com/precise/libopenmpi-dev

As mentioned earlier, please run apt-get update and then apt-cache search for the libopenmpi packages.

If it still doesn't help. Try to change your mirror. Or paste the content of your /etc/apt/sources.list

Terry Wang
  • 9,505
  • 4
  • 37
  • 30
  • Thanks Jokerdino for your suggestion but apt-cache search openmpi not giving any result .Is that possible that libopenmpi is not available for Ubuntu 12.04 ?because it was working fine on my Ubuntu 10.10. – dnivog Nov 03 '12 at 18:46
0

I always run apt-get update and I was still getting the above error. The thing that did it for me was adding --no-install-recommends to the command.

For example:

apt-get install -y --no-install-recommends libopenmpi-dev

Hope that helps someone in the future.

Display name
  • 101
  • 2
  • just `apt-get` returned me error `Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)` as I was not in root, `sudo` solved that. – bim May 31 '22 at 11:59