# Error building 'MPI\`, libmpi could not be found

**URL:** <https://discourse.julialang.org/t/error-building-mpi-libmpi-could-not-be-found/63785>\
**Category:** Julia at Scale\
**Created:** [June 29, 2021, 8:09pm UTC](https://discourse.julialang.org/t/error-building-mpi-libmpi-could-not-be-found/63785 "2021-06-29T20:09:59Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![QuanlingDeng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quanlingdeng/32/27360_2.png) [@QuanlingDeng](https://discourse.julialang.org/u/QuanlingDeng)\
**Post date:** [July 22, 2021, 1:17am UTC](https://discourse.julialang.org/t/error-building-mpi-libmpi-could-not-be-found/63785/29 "2021-07-22T01:17:37Z")

</div>

Thanks for your reply.

I have now figured it out and it worked.  
I did not change any of other environmental variables but did the following

1. go to a terminal
2. type emacs ~/.julia/prefs/MPI.toml
3. set path = “/usr/local/Cellar/open-mpi/4.1.1\_2”

It seems that the way of setting the path is different from the ways in the two links in my original post (see [Error building MPI---ERROR: LoadError: libmpi could not be found](https://discourse.julialang.org/t/error-building-mpi-error-loaderror-libmpi-could-not-be-found/65016)) which were in the files ~/.bash\_profile or ~/.profile

Maybe it’s Julia version thing

---

_[View the full topic](https://discourse.julialang.org/t/error-building-mpi-libmpi-could-not-be-found/63785)._
