# Gsl not working in Ubuntu 22

**URL:** https://community.freefem.org/t/gsl-not-working-in-ubuntu-22/2068
**Category:** FreeFEM installation
**Created:** [October 17, 2022, 9:36am UTC](https://community.freefem.org/t/gsl-not-working-in-ubuntu-22/2068 "2022-10-17T09:36:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jtermens](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jtermens](https://community.freefem.org/u/jtermens)
#### Post date: [October 17, 2022, 9:36am UTC](https://community.freefem.org/t/gsl-not-working-in-ubuntu-22/2068/1 "2022-10-17T09:36:34Z")

</div>

Recently, I installed the latest FreeFem++ v4.11 on a terminal running Ubuntu 22.04 (jammy jellyfish). The installation went without any error, but when I try to run a script that uses the gsl plugin I get the following error:

```auto
Load error: gsl
	 fail: 
 dlerror : libgsl.so.23: cannot open shared object file: No such file or directory
list prefix: './' '/usr/local/lib/ff++/4.11/lib/' list suffix: '' , '.so'

```

Then, I started by looking at `/usr/local/lib/ff++/4.11/lib/`, where I found the shared library `gsl.so`, and by looking the versions of the (as far as I know) related libraries, which are:

```auto
libc6, version 2.35-0ubuntu3.1
libgcc-s1, version 12.1.0-2ubuntu1~22.04
libgslcblas0, version 2.7.1+dfsg-3
libgsl-dev, version 2.7.1+dfsg-3

```

all of them in their newest versions. Then I tried to install `libgsl23`, but I only find the versions for Ubuntu 20.04, so I don’t know what else could I do, as I’m not sure where the problem comes from.

What do you think I should do?

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [October 19, 2022, 9:44am UTC](https://community.freefem.org/t/gsl-not-working-in-ubuntu-22/2068/2 "2022-10-19T09:44:09Z")

</div>

On ubuntu try to recompile gsl.cpp with form a source .

so egt 2 file

[https://github.com/FreeFem/FreeFem-sources/raw/master/plugin/seq/gsl.cpp](https://github.com/FreeFem/FreeFem-sources/raw/master/plugin/seq/gsl.cpp)  
[https://github.com/FreeFem/FreeFem-sources/raw/master/plugin/seq/ff\_gsl\_awk.hpp](https://github.com/FreeFem/FreeFem-sources/raw/master/plugin/seq/ff_gsl_awk.hpp)  
with

on me mac , just change the place of include and lib of gsl  
and pust gsl.so a correct place in the distribution !`

```auto
brochet:Downloads hecht$ ff-c++ gsl.cpp -I/opt/homebrew/include -L/opt/homebrew/lib -lgsl
g++ -c '-I/Applications/FreeFem++.app/Contents/ff-4.11/lib/ff++/4.11/include' '-I/opt/homebrew/include' -Wno-undefined-var-template -m64 -fPIC -DNDEBUG -O3 -O3 -O3 -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/Applications/FreeFem++.app/Contents/ff-4.11/ff-petsc/r/include -I/opt/homebrew/Cellar/hdf5/1.12.2_2/include -I/opt/homebrew/opt/libaec/include 'gsl.cpp'

g++ -bundle -undefined dynamic_lookup -Wno-undefined-var-template -m64 -fPIC -DNDEBUG -O3 -O3 -O3 -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/Applications/FreeFem++.app/Contents/ff-4.11/ff-petsc/r/include -I/opt/homebrew/Cellar/hdf5/1.12.2_2/include -I/opt/homebrew/opt/libaec/include 'gsl.o' -o gsl.dylib '-L/opt/homebrew/lib' '-lgsl'
ld: warning: -undefined dynamic_lookup may not work with chained fixups

```

---

<div class="post-metadata">

### Author: ![jtermens](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jtermens](https://community.freefem.org/u/jtermens)
#### Post date: [October 24, 2022, 12:50pm UTC](https://community.freefem.org/t/gsl-not-working-in-ubuntu-22/2068/3 "2022-10-24T12:50:26Z")

</div>

Thank you so much for the suggestion, now its solved and works properly.
