0

In my infinite wisdom, I deleted the file 'mpicc.openmpi' file in my /usr/bin/ folder by mistake.

I tried installing OpenMPI as well as GCC. But don't know how to get back to normalcy.

Can anyone please help me out.

Thanks.

rku
  • 1
  • 3
    Possible duplicate of [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file) In your case the package that provides the missing file is libopenmpi-dev (`sudo apt install libopenmpi-dev`). – karel Oct 18 '19 at 11:12

1 Answers1

0

You can check which package provides the file like this:

dpkg -S mpicc.openmpi

which indicates it is in the openmpi-bin package. Then reinstall that package like this:

sudo apt reinstall openmpi-bin

After that, the file should be there again.

EDIT: forgot to add that this was for Ubuntu 19.04 -- the package name could be different for other Ubuntu versions.

Elias
  • 1,899
  • 1
  • 11
  • 26
  • The EDIT in the last paragraph explains the unexpected result that I got when I tried running the above command in Ubuntu 18.04. To be specific I have openmpi-bin installed in Ubuntu 18.04, but `dpkg -S mpicc.openmpi` does not say that it provides the missing file. – karel Oct 18 '19 at 11:33