Installing latest version of gmsh

How can I install latest version of gmsh, which is gmsh 3.0.7 on ubuntu 16.04LTS please? Using sudo apt install gmsh it only installs gmsh 2.10.1.

I also did update and upgrade my system but still only version 2.10.1.

Any suggestion please? Cheers


Solution 1:

First, I prefix this by saying I'm nothing like an expert, but this worked for me:

Uninstall the repository version:

sudo apt-get remove gmsh

Download a zipped copy of the latest stable release for linux from the gmsh website:

http://gmsh.info/#Download

Unzip gmsh:

tar -xvzf gmsh-3.0.6-Linux64.tgz (or whatever version you've downloaded)

This makes a folder gmsh-3.0.6-Linux64 containing gmsh which is portable. Put it somewhere you can find it. I put it in my home directory. Navigate to the bin folder:

cd ~/gmsh-3.0.6-Linux64/bin

From the bin folder you can start gmsh by typing:

./gmsh

I made it generally available at the command line by editing my .bashrc, adding this line:

export PATH="$PATH:/home/bob/gmsh-3.0.6-Linux64/bin"

You will need to make the path appropriate for your location. Hope this works.