# Load PETSc error with FreeFem++

**URL:** <https://community.freefem.org/t/load-petsc-error-with-freefem/747>\
**Category:** General Discussion\
**Created:** [January 16, 2021, 5:01am UTC](https://community.freefem.org/t/load-petsc-error-with-freefem/747 "2021-01-16T05:01:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://community.freefem.org/u/Tim)\
**Post date:** [January 16, 2021, 5:01am UTC](https://community.freefem.org/t/load-petsc-error-with-freefem/747/1 "2021-01-16T05:01:24Z")

</div>

Dear all,

I am trying for the first time to use FreeFem++, I installed it and it seems to work.  
However, I tried to work on some examples using PETSc, I installed it and I get always the same error despite reinstalling PETSc open-mpi and reinstalling even FreeFem++.

The error I always get is the following:

> ```
> 2 : load "PETSc"
> 
> ```
> 
> load error : PETSc  
> fail :  
> dlerror : dlopen(/usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/PETSc.dylib, 1): image not found  
> list prefix: ‘./’ ‘/usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/’ list suffix : ‘’ , ‘.dylib’  
> Error line number 2, in file mycode.edp, before token PETSc

If someone could help me on this I would really appreciate.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [January 16, 2021, 10:53am UTC](https://community.freefem.org/t/load-petsc-error-with-freefem/747/2 "2021-01-16T10:53:13Z")

</div>

It seems you are trying to load a plugin compiled for FreeFEM version 3.61-1, which is about 5 years old, see in the log `/usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/PETSc.dylib`. Please try to make a fresh install, by making sure you don’t have any old FreeFEM files installed somewhere on your machine and following [these](https://github.com/FreeFem/FreeFem-sources#freefem) steps, and if you run into new issues, do let us know.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://community.freefem.org/u/Tim)\
**Post date:** [January 20, 2021, 3:08am UTC](https://community.freefem.org/t/load-petsc-error-with-freefem/747/3 "2021-01-20T03:08:14Z")

</div>

I don’t know how I ended up downloading a previous version of FreeFEM but it was indeed the issue and it is now solved.

Thanks a lot for your help!
