Freefem not starting in ubuntu 18.04 after installing via apt


I have installed freefem using apt in ubuntu 18.04 and I try to execute a first example , pretty much straight from the manual:

 bool debug= true;

border C(t=0, 2*pi){x=cos(t); y=sin(t);}
mesh Th = buildmesh(C(50));
fespace Vh(Th, P1);
Vh u, v;
func f= x*y;
real cpu=clock();
solve Poisson(u, v, solver=LU) = int2d(Th)( dx(u)*dx(v) + dy(u)*dy(v)) - int2d(Th)( f*v) + on(C, u=0);
cout << "CPU time = " << (clock()-cpu) << endl;

Then I get this :

 > freefem ex1.pde 
 file : ex1.pde
line 1: Unexpected symbol: 'new variable' Instead of 'fonction' 
Segmentation fault (core dumped)

which does not seem right at all, but I really don’t understand what is going on… Any help would be appreciated !
Best regards,

The apt package seems quite old (version 3.5). Try command apt show freefem, on my Ubuntu 20.04 it yields:

Package: freefem
Version: 3.5.8-7build1
Priority: optional
Section: universe/math
Origin: Ubuntu
Maintainer: Ubuntu Developers <>
Original-Maintainer: Debian QA Group <>
Installed-Size: 37,9 kB
Depends: libfreefem0 (= 3.5.8-7build1), libc6 (>= 2.3.4), libgcc-s1 (>= 3.0), libstdc++6 (>= 5)
Suggests: freefem-examples (= 3.5.8-7build1), freefem-doc (= 3.5.8-7build1)
Download-Size: 6 508 B
APT-Sources: focal/universe amd64 Packages
Description: langage orienté vers un environnement de développement, utilisant la méthode des éléments finis
 FreeFEM est un langage adapté aux équations aux dérivées partielles. La
 méthode sous-jacente utilisée est celle des éléments finis. Cet outil a
 été utilisé avec succès comme outil d’enseignement et même comme outil de

I suggest installing ff++ from source following the instructions at

OK, thanks a lot for your answer Vincent : I’ll try that asap !!

Have a god day,


This installation was the way to go, thanks a lot !!!